Confusion in 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/courses/javascript-beginner-en-XEDZA/0/5?curriculum_id=506324b3a7dffd00020bf661#
<In what way does your code behave incorrectly? Include ALL error messages.>
Hi,
I’m unable to understand the ending condition in the for loop as to why there is “i +” attached with name.length. if someone could elaborate on it

```

for(j=i;j<i+myName.length;j++)
{
hits.push(text[j]);

<do not remove the three backticks above>

#2

@rehans516

This is about looping over your entire name. Since the j variable is incrementing, it will be important to have the entire characters of your name stocked in your hits array! So we will add the I variable to myName.lenght


#3

I’m confused about this, too. What is happening when you add i to myName.length?