← All freeCodeCamp videos

Classic JavaScript gotcha: why does this print 3, 3, 3 instead of 0, 1, 2?

7,622 views 55 likes 2025-11-29 0:16 Watch on YouTube ↗ freeCodeCamp ↗
Web DevelopmentJavaScript

Chapters

No chapter markers in this video's description.

Show the creator's full description
Here's a classic JavaScript "gotcha": why does this print 3, 3, 3 and NOT 0, 1, 2! Ania explains here.

Description and video by freeCodeCamp.org. This page is an independent companion view; the video is embedded from YouTube.