Author: Jonas Mendes from Huge Rio.
This presentation covers what have changed from the previous ES5 version of Javascript, and the main new features of ES6 or ES2015.
12. The“let” statement declares a block
scope local variable.
“Let” allows you to declare variables that are limited in scope
to the block, statement, or expression on which it is used.
“Var” variables are limited in scope to the function statement.
13. Use ”let” to define variables
limited in scope to the block.
14. “Var” isn’t dead.
"Let" will make the javascript engine create a new scope for
each block that has a "let" variable in it.
27. Ideas of block structure were developed
in the 1950s during the development of
the first autocodes,and were formalized
in the Algol 58 and Algol 60 reports.
28. In computer programming,a block or
code block is a section of code which is
grouped together.Blocks consist of one
or more declarations and statements.
29. Blocks narrow the lexical scope of
variables,procedures and functions
declared in it,so that they do not conflict
with variables having the same name
used elsewhere.
38. Arrow functions are always anonymous.
An arrow function expression has a shorter syntax compared to
function expressions and lexically binds the "this" value.