Languages
[Edit]
EN

JavaScript - Math.pow() method example

13 points
Created by:
Kia-H
546

Math.pow() is a static method that returns a base raised to the power of the exponent (value^exponent operation).


1. Documentation

Edit
SyntaxMath.pow(base, exponent)
Parameters

The method takes integer or float number arguments (primitive values).

  • base - base of power
  • exponent - exponent used with a base
Result

number value (primitive value) calculated as base raised to the power of exponent or NaN if the operation can not be executed.

Descriptionpow is a static method that returns a base raised to the power of the exponent (value^exponent operation).

2. Exponentiation operator (**) example

Edit

Note: this feature has been introduced in ES2016.

Alternative titles

  1. JavaScript - Math.pow() documentation with examples
  2. js - Math.pow() method documentation with examples
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

JavaScript - Math documentation (EN)

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join