Author Topic: shameless javascript help?  (Read 224 times)

can someone pseudocode this and tell me why it's not working?
Code: [Select]
/*jshint multistr:true */
var text = "yo what's up Lance, how are you doing, Lance?"
var myName = "Lance"
var hits = [];
for(var i = 0; i > text.length; i++){
    if(text[i] === 'L'){
       for (var j=i; j < i + myName.length; j++){
    hits.push(text[j]);
        }
    }
}
I want it to find every occurence of "Lance" and push only the letters inside "Lance" to the hits array.
Why isn't this working? I'm using codecademy.

oh woops, that one > should have been a <
.-.