Intermediate Algorithm Scripting: Pig Latin help

function translatePigLatin(str) {
let myRegex = /^[aeiou]/;
var result = myRegex.test(str); 
if (result==true){
   str+='way'
}else{
   if (str.substring(1,2)=="a"){
   str=str.substring(1,)+str.substring(0,2)+"y";

   }else{
   str=str.substring(2,)+str.substring(0,2)+"ay";
   }  
}
console.log(str);
  return str;

}
translatePigLatin("california");

I do not understand what else is needed?

Your code currently only handles two consonants at the beginning or the word. What happens if the word is something like qwrse?

Please write the answer what should be the word “qwrse”?

Perhaps I do not understand the conditions correctly

So for qwrse

Pig Latin takes the first consonant (or consonant cluster) of an English word,

qwrs

moves it to the end of the word

eqwrs

and suffixes an “ay”.

eqwrsay

Thanks now clear.

English is not my native language