Hemanth's Scribes

javascript

ES7 Features

Author Photo

Hemanth HM

Thumbnail

ECMAScript 7 is the next evolution of the ECMA-262 standard.

Exponentiation Operator

let cubed = x => x ** 3;
cubed(2); // 8
## Array.prototype.includes

```javascript
[1, 2, 3].includes(3); // true
[1, 2, NaN].includes(NaN); // true

## Async Functions
javascript
async function asyncMania() {
  console.log("1");
  await wait(1000);
  console.log("2");
}

## Object.observe
javascript
Object.observe(obj, function(changes) {
  console.log(changes);
});

## Object.getOwnPropertyDescriptors
javascript
let life = { answer: 42 };
Object.getOwnPropertyDescriptor(life, 'answer');
// { configurable: true, enumerable: true, value: 42, writable: true }

See the full list at git.io/es7.

#javascript#es7
Author Photo

About Hemanth HM

Hemanth HM is a Sr. Machine Learning Manager at PayPal, Google Developer Expert, TC39 delegate, FOSS advocate, and community leader with a passion for programming, AI, and open-source contributions.