0

What is the difference between "+=" & "=+"

20th Jul 2016, 1:08 PM
Umed Jadhav
Umed Jadhav - avatar
3 Answers
+ 3
x+=1 is a increment operator like x++ x=+1 isn't exist
27th Jul 2016, 11:47 AM
Mohammad Reza Karimi
Mohammad Reza Karimi - avatar
+ 2
The first is an accumulator operator the second doesn't exist, if you'd use it anywhere I'm your code you'd get a syntax error
21st Jul 2016, 4:42 AM
Eric Gitangu
Eric Gitangu - avatar
0
second doesn't exist.. first one will add the amount of value (which is written after =) to the present value of the variable.. e.g. a+=2 ~ a=a+2
21st Jul 2016, 3:46 PM
Surpreet Kaur
Surpreet Kaur - avatar