The JavaScript expression += is just a shorthand for writing:
value = value + something.
For example:
// let's say you have initial value 5
let someValue = 5;
// you can use this shorthand
someValue += 1;
// and this is equivalent to
someValue = someValue + 1;
// in both cases the end result is 6
However, make sure your code is always immutable because there is almost never a good reason to change the existing values in JavaScript. And it usually leads to bugs.
Hope this helps.
P.S. -> read this article if you want to double your salary
TAGS: what is += in javascript, what does += mean in javascript,