let in loops
medium
for (var i = 0; i < 3; i++) setTimeout(() => console.log(i)); prints 3 3 3. What does the same loop print with let?
Your answer
Stuck?
Open hints one at a time. The write-up explains a full solution.
Discussion
Ask a question or share a tip. Please don’t post full solutions. Posts appear once a moderator approves them.
No posts yet.