What am I doing wrong 2nd for statement



Oops, try again. It looks like your second 'for' loop isn't pushing values to the hits array. Make sure it's working properly and that myName's text appears somewhere in the text variable.

/*jshint multistr:true */

var text = "Hi, How are you\
        doing? I am Marphil."
var myName = "Marphil"
var hits = []

for(i = 0; i > text.length; i++){
    if(text[i] === "M"){
        for(j = i; j < (i + myName.length); j++){


in your first for loop:

for(i = 0; i > text.length; i++)

why do you use >? that doesn't make much sense, i is smaller then text.length, it should be the other way around (<), this way it will run until i becomes larger then the length of text


Seriously? haha Thanks so much bro. It worked!