JavaScript ( ) Grouping Operator
The grouping operator ( ) controls the order in which parts of an expression are evaluated, overriding normal precedence.
Description
The grouping operator, a pair of parentheses around an expression, has the highest precedence, so whatever is inside is evaluated first. Use it to override the normal order, as in (a + b) * c, and to make intent clear even when it isn't strictly needed. Parentheses are required when mixing ?? with && or ||.
Parentheses don't change what operands are evaluated first; they only change how operators are grouped. In a() * (b() + c()), the functions are still called left to right, a() first. They're also needed in a few syntactic situations, such as returning an object literal from an arrow function, () => ({ id: 1 }), and wrapping an object destructuring assignment, ({ a, b } = obj).
Adding parentheses that aren't strictly necessary is often worthwhile for readability, especially when mixing arithmetic with comparison or logical operators. Code formatters may remove redundant ones, so check your tools' settings if you rely on them for clarity.
Properties
- Operator
( )- Category
- Other
- Precedence
- 18 (1 is lowest, 18 is highest)
- Associativity
- n/a
Syntax
(expression)Example
Browser Support
The following information will show you the current browser support for the ( ) operator. Hover over a browser icon to see the version that first introduced support for this operator.
Desktop





Tablets & Mobile





