What is the problems?


#1


Replace this line with your code. 
/*jshint multistr:true */

var text = "Hey, seven how are you \ doing? My name is seven.";

var myName = "seven";

var hits = [];

for ( var i = 0; i <= text.length; i++);{
    if (text[i] === "s"); {
        for (var j =i; j < (i + myName.length); j++)
        {
        hits.push(text[j]);
        }
    }
}


#2

careful with your semi-colons, after the brackets of a for loop and if condition:

if (){}
for(){}

shouldn't be semi-colons, you have semi-colons:

if ();{}
for();{}

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.