Scripter Javascript Tutorial
javascriptmusiclogicscripterbookexcerpttutorial35 Operator Precedence
MDN: Operators: Operator Precedence
When JavaScript executes calculations on statements, it follows an order of precedence similar to PEMDAS (Parentheses, Exponents, Multiplication, Division, Addition, Subtraction). Because there are far more than just those operations, a larger list is defined by the JavaScript language community.
Table [Tab:OperatorOrderOfPrecedence] has a complete order of precedence for all operations, including those which are not covered in this book, and PEMDAS operations are highlighted. This level of detail is typically not needed when using Scripter, but is useful to reference in case there is a comparison which is not giving expected results.