js pow
Math.pow(base, exponent);
Math.pow(2, 4);
// Outputs 16
// The same as going 2^4, 2 to the power of 4let 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 // Use Math.exp(a) to return the exponential of the value passed
var num = Math.exp(1)
Also in JavaScript:
- drupal 8 get url from node entity
- jquery find div with data attribute value
- jquery remove string from string
- angular material inline list
- js int to string base
- new create react app
- form data-request octobercms
- angular datatable reload with pagination
- jest mock call
- javascript online compiler
- return statement javascript
- (node:2496) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
- javascript download current html page
- move file from one folder to another in aws s3 nodejs
- button not exist js
- core.js:6228 ERROR TypeError: Cannot read property 'image' of undefined
- how to learn javascript
- find length of longest string in array javascript
- jquery scroll down 1 pixel
- add dev dependency yarn
- nodejs express return image
- js object for each
- javascript reload page
- javascript print object pretty