Let, Const and Var
Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.
The problem
- easy
A teammate asks why the style guide says to use const by default, let when a value changes, and never var. Explain the differences between the three, and what goes wrong in a for loop that uses var to create click handlers that each log their own loop number.
Talk this problem through with an AI coach
Sign in with Google to start a free voice session — no credit card needed.