includes()

JavaScript
var vowels=["a","e","i","o","u"]
var consonants=''
function vowelsAndConsonants(s) {
    for(var i=0;i<s.length;i++){
       if(vowels.includes(s[i])){
           console.log(s[i])
       }else{
consonants+= s[i]+'\n';
       }
    }
 console.log(consonants);
}

 
Source

Also in JavaScript: