ESNext notes

Slides

  • ECMAScript is now EcmaScript. Which is a standard for the API JavaScript and other languages use.
  • TC39 stands for Technical Committee which regulate the EcmaScript API.
  • ES.Next is a pointer to the next version of ES
  • ES Harmony is the backlog of the new stuff coming to ES and the versions in development.

Function Hoisting

  1. // Function Declaration
  2. function foo() {
  3. // code here
  4. }
  5. // Function Expression
  6. var bar = function() {
  7. // code here
  8. }

Function declaration gets hoisted to the top, while Function Expression does not.

Variables

  • var Gets hoisted
  • let Lives within block (curly braces)
  • const Also lives within blocks

Temporal Dead Zone

  1. function doSomething() {
  2. console.log(a); // should cause an error
  3. let a = 1;
  4. console.log(a);
  5. }

HTML Templates

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings

More info