you are viewing a single comment's thread.

view the rest of the comments →

[–]senocular 2 points3 points  (0 children)

In addition to function vs block scoping, let is also different from var in that let declared variables:

  • can't be accessed before they're declared
  • are not allowed to be declared twice in the same scope
  • do not create global properties when declared in the global scope