2nd for loop


#1

What should be 2nd for loop as the below code isn't running for me and giving error.

var text = "I am Sebastian";
var myName = "Sebastian";
var hits= [];
for (i=0; i>text.length; i++);
if (text[i] === 'P'){
for(var j = i; j < (myName.length + i); j++) {
hits.push(text[j]);
}
}

if (hits.length === 0) {
console.log("Your name wasn't found!");
} else {
console.log(hits);
}


#2

@preeto89

for (i=0; i>text.length; i++); // run for Loop so Long i is greater than text.length??? And this is not the right Syntax for(); change to for (){}
if (text[i] === 'P'){
 for(var j = i; j < (myName.length + i); j++) {
	hits.push(text[j]);
	}
	}