Like the article, but I think it would help more people with a more thorough explanation. The answers don't exactly state where and why you get Index: 4. We forget people who are just learning and skip steps that are obvious to more advanced developers. Saying closure doesn't explain that the 'i' variable continues to increase. I personally never had one teacher explain the details of a for loop. You might never see it without making this mistake.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Like the article, but I think it would help more people with a more thorough explanation. The answers don't exactly state where and why you get Index: 4. We forget people who are just learning and skip steps that are obvious to more advanced developers. Saying closure doesn't explain that the 'i' variable continues to increase. I personally never had one teacher explain the details of a for loop. You might never see it without making this mistake.