Pages

ES 7 Features

ES7 features:


  • Array.prototype.includes : Similar like indexOf but instead of returning its index, this returns a boolean value (true or false)
  • Exponentiation Operator : a ** b , a pow b
  • Object.values : Allow us to convert an object into an array
  • Object.entries : to get an object's enumerable property pairs in an array format ([key, value])
  • String padding : padStart and padEnd, return string of given length pad if required.
  • Object.getOwnPropertyDescriptors : returns all own property descriptors of an object obj
  • Trailing commas in function parameter lists and calls : In ES8, it’s okay to have the trailing comma:
  • Async Functions - async/await