Q. The main difference between the variables declared with var and with let is
β
Correct Answer: (B)
let is confined to a particular function but var is not
Explanation: Variables declared with var are defined throughout the enclosing function. Variables declared with let are defined only within the closest enclosing block (and any blocks nested within it, of course).