5/7: It's right, but could someone help me find out why?


Hi everyone,

I'm having trouble understanding why we need to add i to the length of myName.

        for (j = i; j < (myName.length + i); j++){

Thanks to anyone who can help me understand this!


The loop starts at i and should then continue for a number of steps equal to the length of the name


Thanks! But why doesn't that make it go one step past the length (aka too many) ?

In other words, why doesn't the j count to the length of myName without the +i ?


bumping. have the same exact question as you efhjones!


Execute it manually and see for yourself. Pick a short name to save yourself some trouble.

Be careful to not do what you expect to happen, make sure you're executing the code as it says, not what you think it does - perhaps you expect it do to something differently from what it says and then you risk doing the same thing when executing the code manually.


I've execute it manually, but I still don't understand what it's doing. I don't know why I have to add the count i to .length, shouldn't .length be long enough already...?


If i is 454353 and the length of the name is 3, then you should loop through:


I'm sorry, thanks for your patience, I don't understand what you mean by this at all :confounded:


What does i represent in your code?

What should your code be doing at each value of i?