CodesJava

Easy learning with example program codes

JavaScript Math pow()

The JavaScript math pow() method is used to get the value of base to the power of an exponent.
Syntax:

Math.pow(base,exponent)

Parameters
base: It represents the base number.
exponent: It represents the exponent to which the base have to raise.

Returns
Base value to the power of exponent.

Example

<!DOCTYPE html>
<html>
<body>
<script>  
document.writeln(Math.pow(2,4));  
</script>  
</body>
</html>

Output

16
Please follow and like us:
error








Copyright © 2019 CodesJava DMCA.com Protection Status