The Exponential Operator

introduction to ES2016 features and using the exponential operator - the syntactic sugar of ES2016

There is not too much to consider for ES2016, as only two new features surfaced: the exponential operator, and the includes method of arrays.

As we will see, these two updates are nothing more than syntactic sugar.

Check out the ES2016 plus compatibility table for more information on the current browser support. Most likely, you will need a transpiler.

Use the ES2017 Babel Preset for code transpilation if you want to support older browsers.

Before ES2016, we could use the Math.pow function to calculate powers of numbers.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.