The
Math.pow() function returns the base to the exponent power, that is, base exponent.Syntax
Math.pow(base, exponent)
Parameters
base- The base number.
exponent- The exponent used to raise the
base.
Description
Because
Examples:pow() is a static method of Math, you always use it as Math.pow(), rather than as a method of aMath object you created (Math has no constructor).Math.pow(4,3); // 4 * 4 * 4 = 48
No comments:
Post a Comment