411 Views
There are 3 ways to create variables in JavaScript: let is block scope, var is function scope, and const is block scope but immutable (i.e. a constant). The difference between let, var, and const is a common interview question, a frequent source of confusion, and hard to explain.
0 comments