5. Your second "for" loop


#1



Hi! Here is my code and i got stuck on it. Help me please to resolve it. What am i doin' wrong?

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


#2

Hi here

for(var text = 0; text < text.length; text++)

instead of text you should use i and you should only keep it here text.length


#3

Thnx! now it works! Startin' da next lesson)


#4

you already took text variable
so remove second one
for(var text <= this
then write var i instead of var text

I m telling you later
At first do this
@arcsurfer54006