Help needed


#1

var text = "hey shiraz gkjkj jhkg shiraz hhjkkkkkkkkkkjb";
var myName = "shiraz";
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]);
}
}
}

i still dont know what is the problem


#2

i am getting the push problem


#3

this line:

for(var i=0; i<=text.length; i++); <- this one

the last semi-colon prevents the loop form executing properly, remove it


#4

thankyou man...its solved