Let n = 2; n += 5; // now n = 7 (same as n = n + 5) n *= 2; // now n = 14 (same as n = n * 2) alert( n ); // 14
We often need to apply an operator to a variable and store the new result in it.
Clickable & Draggable!