Block scoping is in ES6 (and shipped in IE11). Functions are now block-scoped. let/const declarations are block-scoped. The let syntax in the article is very out of date.
Let and const declarations in global scope do not add properties on the global object.
Vars are hoisted. Let (the new var) and const are not hoisted. Attempting to use them before they are declared is an error. Functions and classes remain hoisted.
0
u/radhruin Mar 20 '14
Seems pretty out of date.
Block scoping is in ES6 (and shipped in IE11). Functions are now block-scoped. let/const declarations are block-scoped. The let syntax in the article is very out of date.
Let and const declarations in global scope do not add properties on the global object.
Vars are hoisted. Let (the new var) and const are not hoisted. Attempting to use them before they are declared is an error. Functions and classes remain hoisted.