Type in the words(s) to search for:

    Mark results
      Userbooster Help

      += (Addition Equality)

      The addition equality operator:

      • Performs the addition if the first operand is of boolean, numeric, floating or date-time type. It throws an exception when the second operand is of not appropriate type.
      • Performs the concatenation if the first operand is a string or an exception string. It throws an exception when the second operand cannot be represented as a string.
      • Performs the concatenation if both operands are arrays.
      • Inserts the value to the array if the first operand is an array and the second operand is not an array.
      • Throws an exception otherwise.

      Example

      var i = 1;
      i += 2;