Correct answer: A. `let` has block scope, while `var` has function scope
Explanation
let is block-scoped (limited to its enclosing block), while var is function-scoped — a key ES6 improvement that reduces common bugs.
Practise 3 questions on this topic
Take JavaScript ES6 Features — Timed Test (3 questions) — scored instantly, explanation for every question, no login.