Your second "for" loop


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/javascript-beginner-en-XEDZA/0/5?curriculum_id=506324b3a7dffd00020bf661

<In what way does your code behave incorrectly? Include ALL error messages.>

Can someone elaborate how the for loop for var j executes please? I am confused here. Many thanks


/*jshint multistr:true */
var text = "My name is Adi, and I would like to meet di, because is di\
is cool guy."
var myName = "Adi";
var hits = [];

for(i=0; i<=text.length; i++){
if(text[i]==="A"){    
// If we find it, add characters up to
// the length of my name to the array
	for(var j = i; j < (myName.length + i); j++) {
		hits.push(text[j]);
		}
	}
}

if (hits.length === 0) {
	console.log("Your name wasn't found!");
} else {
	console.log(hits);
}



#2

@ajaxjumper08329,
Please read
Your second for loop stuck