An assignment operator assigns a value to its left operand based on
the value of its right operand. The basic assignment operator is equal
(=), which assigns the value of its right operand to its left operand.
That is, x = y assigns the value of y to x.
The other assignment operators are shorthand for the operations listed in the following table:
Shorthand operator | Meaning
--------------------------------------
| x += y | x = x + y |
----------------------------------------
| x -= y | x = x - y |
----------------------------------------
| x *= y | x = x * y |
----------------------------------------
| x /= y | x = x / y |
----------------------------------------
| x %= y | x = x % y |
----------------------------------------
| x <<= y | x = x << y |
----------------------------------------
| x >>= y | x = x >> y |
----------------------------------------
| x >>>= y | x = x >>> y |
----------------------------------------
| x &= y | x = x & y |
----------------------------------------
| x ^= y | x = x ^ y |
----------------------------------------
| x |= y | x = x | y |
----------------------------------------
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Assignment_operators
The spec defines these "shorthand" operators as Compound Assignment ( op= )
http://ecma-international.org/ecma-262/5.1/#sec-11.13.2
So based from your example, if:
element.innerHTML = 'foo';
then:
element.innerHTML += 'bar';
is the same as:
element.innerHTML = element.innerHTML + 'bar';
which results in:
console.log(element.innerHTML); // "foobar"