+ 1
Explain what does this mean
total+=number; what is this sign +=
5 Answers
+ 8
@Stephen
total+=number;
OR
total=total+number;
+ 1
x+=y is x = x + y
it works with all arithmetic operations (x*=y is x = x * y).
+ 1
This is known as shorthand notation
shorthand what is means
a+=b a = a + b
a-=b a = a - b
a/=b a = a / b
a*=b a = a * b
a%=b a = a % b
0
It means total = total + number
0
it's the 'Add assignment operator'
and I believe they covered above what it does lol