In javascript 1.7, the let
keyword was added. I've heard it described as a "local" variable, but I'm still not quite sure how it behaves differently than the var
keyword.
What are the differences between the two? When should let
be used over var
?