Pig Latin - Some problem with my code

Pig Latin - Some problem with my code
0.0 0

#1

Getting page as

Unable to continue with next topics nor click any of the options in code camp page, page got stuck.


#2


#3

Would you mind copying/pasting your code into your next reply? It would make it easier for us to test out your code.

To enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

EDIT: If it is freezing upon running, then add ?run=disabled to the end of the challenge url to prevent running your code.


#5

getting this error page after adding ?run=disabled to the url


#6

My code -

function translatePigLatin(str)
{
if(!isConsonent(str.charAt(0)))
str.concat(“way”);

else
{
strarr=str.split("");
while(isConsonent(str[0])))
{
st=strarr.slice(1);
strarr.push(st);
}
strarr.join("");
strarr.concat(“ay”);
}
function isConsonent(char)
{
return ![aeiou]/.test(char);
}
return str;
}
translatePigLatin(“consonent”);


#7

I have to run some errands, but I will be back on later today. Hopefully, someone else will be able to assist you.