Language concepts

Operator associativity

Try the free JavaScript compiler

Associativity determines grouping of repeated operators at the same precedence when their grammar permits it. Exponentiation groups right; subtraction groups left.

Formal Syntax & Structure

javascript syntaxjavascript
a ** b ** c

Working Example

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