ES6 intro

a quick review to some ES6 features

César Carruitero / @ccarruitero

arrows

  • func shorthand
  • classes

  • sugar over JavaScript's existing prototype-based inheritance
  • provide a much simpler and clearer syntax to create objects and deal with inheritance.
  • destructuring

  • makes it possible to extract data from arrays or objects into distinct variables.
  • let / const

  • `let` is the new `var`
  • template string

  • like string interpolation
  • default / rest / spread parameter

    for...of

  • similar to for each...in
  • Thanks!