Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js pow

Math.pow(base, exponent);

Math.pow(2, 4);
// Outputs 16
// The same as going 2^4, 2 to the power of 4
Comment

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
Comment

js pow function

var x = parseInt(prompt("Enter the base: "))
var y = parseInt(prompt("Enter the power: "))

var value = parseInt(Math.pow(x, y))

console.log(value)
Comment

javaScript Math.pow()

Math.pow(8, 2);
Comment

PREVIOUS NEXT
Code Example
Javascript :: ajax get request javascript 
Javascript :: react 18.2 
Javascript :: noise expression after effects 
Javascript :: online convert python to javascript 
Javascript :: upload text file react js functional component 
Javascript :: search query in javascript 
Javascript :: mdn objects javascript 
Javascript :: javascript copy text by id to clipboard 
Javascript :: how to run react app on apache server 
Javascript :: useScrollPrecent 
Javascript :: java script layout engine error 
Javascript :: javascript Remove Element from Inner Array 
Javascript :: javascript Passing undefined Value 
Javascript :: javascript setTimeout() method returns the interval id 
Javascript :: random number 1-3 
Javascript :: mui on node 
Javascript :: json syntax 
Javascript :: jquery put value in table 
Javascript :: stack array in localStorage 
Javascript :: Alternate capitalization 
Javascript :: phaser chained animation 
Javascript :: share.sharesingle facebook react native 
Javascript :: Opposites attract 
Javascript :: Count the number of child records on the each parent object 
Javascript :: mongo db backup node js daily 
Javascript :: split array by character javascript 
Javascript :: js includes case insensitive 
Javascript :: codesandbox react emet 
Javascript :: printing in javascript 
Javascript :: underscore.js 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =