I'm new to JS, and I'm pretty clear on why this logs 10 to the console, but I'm not understanding why it logs it 10 times. Can someone please explain this to a noob?
PS - apologies for reactivating an older thread, but this code actually came up in another context, and when I searched I found this discussion. Thanks for understanding.
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.
I'm new to JS, and I'm pretty clear on why this logs 10 to the console, but I'm not understanding why it logs it 10 times. Can someone please explain this to a noob?
PS - apologies for reactivating an older thread, but this code actually came up in another context, and when I searched I found this discussion. Thanks for understanding.