Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

define math.pow() method in javascript

// Math.pow()

// The Math. pow() method returns the value of x to the power of y (xy).

// EXAMPLE : 1
let powerOf = Math.pow(2,5);
console.log(powerOf);
// OUTPUT: 32

// EXAMPLE : 2
let powerOf2 = Math.pow(-2,5);
console.log(powerOf2);
// OUTPUT: -32

// EXAMPLE : 3
let powerOf3 = Math.pow();
console.log(powerOf3);
// OUTPUT: NaN
 
PREVIOUS NEXT
Tagged: #define #method #javascript
ADD COMMENT
Topic
Name
7+4 =