Someone can explain please?


#1


var text = " na na ana nana na nana shai \ jf shai \ fdsa aad agds ";
var myName = "shai";
var hits = [];

for (i = 0; i<text.length; i++)
{
    if(text[i] === "s")
};

#2

What part of your code are you not understanding?


#3

why i have a problem?

"Oops, try again. There was a problem with your syntax."


#4

Ohh okay.

Your if statement doesn't have the opening and closing brackets {} after the if condition so instead of just

if(text[i] === "s")
};

Try

 if (text[i] === 's') {
    }
        
};