Tell us what’s happening:
Your code so far
function translatePigLatin(str) {
if (str[0]=="a"||"e"||"i"||"o"||"u"){
return str + "way";
}else {
let firstChar = str.slice(0,0);
return str + firstChar + "ay";
}
}
translatePigLatin("consonant");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36
.
Link to the challenge: