Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How ECMAScript6 can change your life

How ECMAScript6 can change your life

This presentation contains some content of "How ECMAScript6 can change your life"

Surbhi Agarwal

August 22, 2016
Tweet

Transcript

  1. What is ECMAScript 6? ECMAScript 6, also known as ECMAScript

    2015, is the latest version of the ECMAScript standard
  2. History  1995 – JavaScript  1997 – ECMAScript 1

     2009 – ECMAScript 5  2015 – ECMAScript 6 ECMA - European Computer Manufacturers Association
  3. What you should already know?  JavaScript  HTML 

    CSS  Object Oriented Programming for Classes
  4. ES6 Browser Support  Currently ES6 is not supported completely

     Most of the features of ES5 are supported by all browsers  Conversion from ES6 to ES5 required  Babel Babel is a essentially an ECMAScript 6 to ECMAScript 5 compiler. It allows you to use ES6 features in your projects and then compiles ES5 for you to use in production.
  5. Features in ECMA Script 6  New keywords for declaring

    variables  let  const  Spread Operator  For functions:  Default parameters  Arrow functions  Classes
  6.  ‘let’ allows you to declare variables  limits the

    scope to block, statement, or expression on which it is used ‘let’ keyword
  7.  ‘const’ creates a read-only reference to a value 

    variable identifier cannot be reassigned  Does NOT mean the value it holds is immutable ‘const’ keyword
  8.  allows an expression to be expanded  works with:

     multiple arguments (for function calls)  multiple elements (for array literals)  multiple variables (for de structuring assignment) ‘Spread’ operator (…)
  9.  allow formal parameters to be initialized with default values

    if no value or undefined is passed Default Function Parameters
  10.  also known has “Fat Arrow Functions” and are always

    anonymous  has a shorter syntax compared to function expressions  make the JS code more readable Arrow Functions (=>)
  11.  introduced in ECMAScript 6  provide a much simpler

    and clearer syntax to create objects and deal with inheritance  NOT introducing a new object-oriented inheritance model to JS Classes
  12. Thank you! See you Again Soon  “Success is that

    height of fame, where everyone in this world knows you by name” -Surbhi Agarwal https://in.linkedin.com/in/agarwalsurbhi @surbhiagarwal13