5/7 How to solve it?


var text = "Hello, Asen how are u today, Asen. I love u Asen"
var myName = "Asen"
var hits=[]

for (i=0; i if(text[i] === "A"{
for(j=i; i < (text.length); i++){
} // What's The problem here ?


you can't do this:

for (i=0; i    if(text[i] === "A{

for several reasons, a for loop has 3 sections like you did on the for loop below. then the if statement should be in the curly brackets, if you don't remember, look up syntax for for loop