engineering-hub

Knowledge index of IT engineering

View project on GitHub

Source

[Article] Difference Between ES6 vs ES5

Intro

The full form of ES is ECMA Script which is basically a trademarked scripting language defined by ECMA International. This is mainly used for client-side scripting on the World Wide Web. The first edition of the ECMA Script was published in June 1997.

The sixth version of ECMA Script is known as ES6 (it is also called as ECMA Script 2015). The ES6 includes the following important features:

ES6 Features

  1. Arrows: These are a function which is described by the ‘=>’ syntax
  2. Objects: Object literals are used to support the prototype assignments.
  3. Classes: ES6 classes can be easily implemented over the prototype based object oriented pattern
  4. Destructing: It allows binding pattern which is based primarily on the pattern matching.
  5. String interpolation
  6. Default
  7. Spread
  8. Module Loaders
  9. Weak set
  10. Map
  11. New Library
  12. Promises
  13. Proxies

The fifth edition of the ECMA Script is known as ES5 and ECMA Script 2009. The ES5 includes the following important features:

ES5 Features

  1. Strict Mode: It basically helps javascript languages to perform more efficiently by applying more checks and cleaning a few existing features
  2. Accessors: It allows users to implement the getting and setting of properties by using methods.
  3. Syntactical changes:
    1. Trailing Commas
    2. Multiline string literals
    3. Property keys using reserved words
  4. Additional features: There are few additional new features have been introduced in case ES5.