Favorites

JavaScript ( ) Grouping Operator

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
( )
JavaScript Other OperatorThis operator is supported by all modern browsers.
Updated 28th November 2026

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

console.log(2 + 3 * 4);
console.log((2 + 3) * 4);
const a = null, b = 0;
console.log((a ?? b) || 'fallback');

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.

This operator is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee