Pig Latin - Some problem with my code

Getting page as

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

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.

markdown_Forums

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

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

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”);

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