Exponentiation Assignment (**=) Operator
JavaScript’s exponentiation assignment (**=) operator updates a variable by raising its value to the power of another.
Syntax:
num1 **= num2
Example: In this example we are using the Exponentiation assignment (**=).
Javascript
// Using the exponentiation assignment operator let num1 = 2; let num2 = 3; // Equivalent to: num1 = num1 ** num2; num1 **= num2; console.log(num1); |
8
JS 2016 or ECMAScript 2016
JavaScript 2016 (ES2016) is a modified version of ES2015 in which they introduced some new features like JavaScript Exponentiation (**) operator, JavaScript Exponentiation assignment (**=), and Array..includes() method for array element presence checking, enhancing calculations, and array operations, JavaScript 2016 is also known as ECMAScript 2016.