📅  最后修改于: 2022-03-11 15:03:43.129000             🧑  作者: Mango
const vowels = [];
const consonants = [];
s.split('').forEach(function(o) {
if (['a','e','i','o','u'].indexOf(o) != -1) {
vowels.push(o);
} else {
consonants.push(o);
}
})
console.log(vowels.join('\n'));
console.log(consonants.join('\n'));
}