JavaScript Grouping Operator Last Updated : 12 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The Grouping operator consists of a pair of parentheses around an expression or sub-expression to override the normal operator precedence so that expressions with lower precedence can be evaluated before an expression with higher priority. This operator can only contain expressions. The parameter list is passed to a function within this operator which will treat it as an expression. Syntax: ( )This ( ) operator controls the precedence of evaluation in expressions Example 1: Below is an example of the Grouping operator. JavaScript function gfg() { // 3 * (2 + 3) let value1 = 3 * (2 + 3); // (3 + 2) * 3 let value2 = (3 + 2) * 3; console.log(value1); console.log(value2); } gfg(); Output15 15Example 2: Function as a statement and exception. In the below code, JavaScript considers a function as a statement if it is not preceded by any other statement. But applying a grouping operator that has the highest precedence over any other operator considers the function as an expression and hence it gets fully evaluated. JavaScript function(x) { return x }; // SyntaxError: Function statements // require a function name. // function as expression (function (x) { return x }); // This will run without any exception. Output: Uncaught SyntaxError: Function statements require a function nameExample 3: With and without grouping operator. JavaScript function gfg() { // 5 * 5 + 5 // 25+5 // 30 let value = 5 * 5 + 5; console.log("Without grouping operator: " + value); // 5 * (5 + 5) // 5*10 // 50 let value1 = 5 * (5 + 5); console.log("With grouping operator: " + value1); } gfg(); OutputWithout grouping operator: 30 With grouping operator: 50We have a complete list of Javascript Operators, to check those please go through the Javascript Operators Complete Reference article. Supported Browser:Chrome 1 and aboveEdge 12 and aboveFirefox 1 and aboveInternet Explorer 3 and aboveOpera 3 and aboveSafari 1 and above Comment A abhishekkharmale Follow Improve A abhishekkharmale Follow Improve Article Tags : JavaScript Web Technologies javascript-operators Explore JavaScript BasicsIntroduction to JavaScript4 min readVariables and Datatypes in JavaScript6 min readJavaScript Operators5 min readControl Statements in JavaScript4 min readArray & StringJavaScript Arrays7 min readJavaScript Array Methods7 min readJavaScript Strings5 min readJavaScript String Methods9 min readFunction & ObjectFunctions in JavaScript5 min readJavaScript Function Expression3 min readFunction Overloading in JavaScript4 min readObjects in JavaScript4 min readJavaScript Object Constructors4 min readOOPObject Oriented Programming in JavaScript3 min readClasses and Objects in JavaScript4 min readWhat Are Access Modifiers In JavaScript ?5 min readJavaScript Constructor Method7 min readAsynchronous JavaScriptAsynchronous JavaScript2 min readJavaScript Callbacks4 min readJavaScript Promise4 min readEvent Loop in JavaScript4 min readAsync and Await in JavaScript2 min readException HandlingJavascript Error and Exceptional Handling6 min readJavaScript Errors Throw and Try to Catch2 min readHow to create custom errors in JavaScript ?2 min readJavaScript TypeError - Invalid Array.prototype.sort argument1 min readDOMHTML DOM (Document Object Model)9 min readHow to select DOM Elements in JavaScript ?3 min readJavaScript Custom Events4 min readJavaScript addEventListener() with Examples9 min readAdvanced TopicsClosure in JavaScript4 min readJavaScript Hoisting6 min readScope of Variables in JavaScript3 min readJavaScript Higher Order Functions7 min readDebugging in JavaScript4 min read Like