JavaScript exponents
Math.pow()
:
js> Math.pow(12, 2)
144
There is an exponentiation operator, which is part of the ES7 final specification. It is supposed to work in a similar manner with python and matlab:
a**b // will rise a to the power b
Now it is already implemented in Edge14, Chrome52, and also it is available with traceur or babel.
Math.pow(base, exponent)
, for starters.
Example:
Math.pow(12, 2)