Not pushing values into arrays? where did I go wrong?


#1



/*jshint multistr:true */
var text = 'Jeremiah, penis, penis, Jeremiah';
var myName = 'Jeremiah';
var hits = [];

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


#2

@dropkickfishmuffin,

Try it by using the IF condition

(text[i] === "J")