5/7 - Please tell me what is wrong! Every time I submit browser crashes


#1

/*jshint multistr:true */
var text = "Hey, how are you \
doing? Do you think Ben is \
a nice name? My name is Ben!";

var myName = "Ben";

var hits = [];

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


#2

Look in the second condition of your for loop, you're comparing if i is less then when it should be j.


#3

Thank you so much :sweat_smile: