freeCodeCamp/guide/russian/javascript/standard-objects/math/math-pow/index.md

27 lines
867 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
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)