The exponentiation operator may come in handy when working with math. Let's use the formula to calculate the area of a circle as an example:
const area = 3.14 * r * r;
We could also use the Math.pow function to write the same code:
const area = 3.14 * Math.pow(r, 2);
ES2016 introduced **, where ** is designed to be the new exponentiation operator. We can calculate the area of a circle using the exponentiation operator as follows:
const area = 3.14 * (r ** 2);
ES2015+ also has some other functionalities; among them, we can list iterators, typed arrays, Set, Map, WeakSet, WeakMap, tail calls, for..of, Symbol, Array.prototype.includes, trailing commas, string padding, ...