[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/Exponentiation [Back]  [Original]

(**) - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

(**)

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2017 3.

(**) , . BigInt Math.pow() .

In this article

console.log(3 ** 4);
// Expected output: 81

console.log(10 ** -2);
// Expected output: 0.01

console.log(2 ** (3 ** 2));
// Expected output: 512

console.log((2 ** 3) ** 2);
// Expected output: 64

js
x ** y;

. a ** b ** c a ** (b ** c) .

PHP, Python (**) ( +, - ) . Bash .

JavaScript . (+/-/~/!/delete/void/typeof) , SyntaxError .

js
-2 ** 2;
// Bash 4,   -4
//   JavaScript  

-(2 ** 2);
// JavaScript -4,   

^ , JavaScript XOR .

js
2 ** 3; // 8
3 ** 2; // 9
3 ** 2.5; // 15.588457268119896
10 ** -1; // 0.1
NaN ** 2; // NaN

js
2 ** 3 ** 2; // 512
2 ** (3 ** 2); // 512
(2 ** 3) ** 2; // 64

,

js
-(2 ** 2); // -4

,

js
(-2) ** 2; // 4

Specification
ECMAScript 2027 LanguageSpecification
# sec-exp-operator


Web Proxy Viewer  |  New URL  |  Original Page