Please help, nothing is working!


#1

Nothing else is working, please help! What am I doing wrong?


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


#2

I cannot be zero and greater than text.length at the same time. Change the direction of your inequality.


#3

Thank a bunch, I was stuck on that for a long time.


#4

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