Type in the words(s) to search for:

    Mark results
      Userbooster Help

      Operator Precedence

      The operators, ordered from highest to lowest precedence, listed in the table below. The operators with the same precedence are evaluated in the order from left to right.

      Table 16. 

      Operator Description
      . [] () field access, array access, function calls, expression grouping
      ++ -- - ~ ! delete new aggregate unary operators, return data type, dynamic object construction
      * / % multiplication, division, modulo division
      + - addition, subtraction
      << >> binary shift
      < > comparisons
      == != equality, inequality
      & binary and, get reference
      ^ binary xor
      | binary or
      && logical and
      || logical or
      ?: conditional
      =operation= Assignment, assignment with operation (*= /= %= += -= <<= >>= <= >= &= ^= |=)
      , serial execution

      Parentheses can be used for altering the order of evaluation so an expression within parentheses is fully evaluated before its value is used in the remainder of the expression.

      Example

      var i = 120 / (2+3);

      In this example the addition is executed first, then the multiplication and finally the assignment.