Files
freeCodeCamp/guide/russian/javascript/standard-objects/math/math-pow/index.md
2018-10-16 21:32:40 +05:30

27 lines
867 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Math Pow
localeTitle: Math Pow
---
## Math Pow
`Math.pow()` возвращает значение числа в значение другого числа.
#### Синтаксис
`Math.pow(base, exponent)` , где `base` - это базовое число, а `exponent` - номер, с помощью которого можно поднять `base` .
`pow()` - статический метод `Math` , поэтому он всегда называется `Math.pow()` а не как метод для другого объекта.
#### Примеры
```js
Math.pow(5, 2); // 25
Math.pow(7, 4); // 2401
Math.pow(9, 0.5); // 3
Math.pow(-8, 2); // 64
Math.pow(-4, 3); // -64
```
#### Дополнительная информация:
[MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow)