You are viewing a single comment's thread. Return to all comments →
function vowelsAndConsonants(s) { let vowels = ["a", "e", "i", "o", "u"]; var others = '' for(let v of s) { if(vowels.includes(v)){ console.log(v); } else{ others += v + "\n" } } console.log(others) }
function vowelsAndConsonants(s) { let vowels = ["a", "e", "i", "o", "u"]; var others = ''
for(let v of s) { if(vowels.includes(v)){ console.log(v); } else{ others += v + "\n" } } console.log(others)
}
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Loops
You are viewing a single comment's thread. Return to all comments →