Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
629 B
1
Indexable
Never
function vowelsAndConsonants(s) {
    for (let i = 0; i < s.length; i++) {

    if ( s[i] == "a" || s[i] == "e" || s[i] == "i" || s[i] == "o" || s[i] == "u" ) {
        console.log(s.charAt(i))
    } 
    
    }
   for (let i = 0; i < s.length; i++) {

    if ( s[i] == "b" || s[i] == "c" || s[i] == "d" || s[i] == "f" || s[i] == "g" || s[i] == "h" || s[i] == "j" || s[i] == "k" || s[i] == "l" || s[i] == "m" || s[i] == "n" || s[i] == "p" || s[i] == "q" || s[i] == "r" || s[i] == "s" || s[i] == "t" || s[i] == "v" || s[i] == "w" || s[i] == "x" || s[i] == "y" || s[i] == "z") {
        console.log(s.charAt(i))
    } 
    
    }
}