Operators

Exponentiation (**)

Try the free JavaScript compiler

Raises the left numeric operand to the right power. It groups right-to-left. A directly preceding unary operator on the base requires parentheses; negative BigInt exponents are invalid.

Formal Syntax & Structure

javascript syntaxjavascript
left ** right

Parameters & Attributes

NameTypeDescription
leftexpressionLeft operand.
rightexpressionRight operand; short-circuiting may skip evaluation where applicable.

Return Value

Number or BigInt

Result of the operation.

Working Example

Example Snippetjavascript
console.log(2 ** 3 ** 2);
JavaScript Reference