ECMAScript 2016


JavaScript Version Numbers

The previous versions of ECMAScript were identified by numbers: ES5 and ES6.

Starting in 2016, the versions are titled according to the year they are released: ES2016, 2018, 2020, and so on.

New Features in ECMAScript 2016

This section presents the latest additions in ECMAScript 2016:

  • JavaScript Exponentiation (**)
  • JavaScript Exponentiation assignment (**=)
  • JavaScript Array includes()

Exponentiation Operator

The exponentiation operator, marked as **, elevates the first number by the value of the second number.

x ** y gives the identical outcome as Math.pow(x, y):


Exponentiation Assignment

The exponentiation assignment operator, represented by **=, increases the value of a variable to the power specified by the right operand.


JavaScript Array includes()

ECMAScript 2016 added the Array.includes method to arrays.

We can determine if an item exists in an array using this method: