DEV Community

Discussion on: What’s your favorite JS interview question?

Collapse
 
buzzfair profile image
Guin White • Edited

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.