javascript math.pow
let number = 2;
let exponent = 3;
//using the exponent operator
console.log( number ** exponent);
// using the Math library
console.log( Math.pow(number, exponent);
// these will both output 8 math.pow(base, exponent)// Use Math.exp(a) to return the exponential of the value passed
var num = Math.exp(1)Math.pow(base, exponent);
Math.pow(2, 4);
// Outputs 16
// The same as going 2^4, 2 to the power of 4
Also in JavaScript:
- react manifest.json 404 (not found)
- javascript create cookie
- angular pass async pipe value to funciton
- factory function javascript
- how to add onclick to child element created javascript
- hoisting js
- js filter
- node save json to file
- javascript howdo i redirect-to another webpage
- vibrate javascript
- use set to remove duplicates in javascript
- passing livewire variable in alpine js
- js detect hash change
- reverse an array javascript
- javaScript disable submit button until form is fully validated
- javascript oneline function
- print in node js
- javascript get current month start and end date
- attr hidden to show jquery
- javascript iterate object key values
- passing props with react
- array index javascript show only first 2 elements
- what does js stand for
- javascript get elements in both arrays