+ 7
+= operator heeeeellppppp
Can someone elaborate the += thing to me? Thank you â¤ď¸
7 Answers
+ 4
x += 7
is the same as if we write
x = x + 7
It is just a shorter version.
+ 4
Abbakar_ahđťđť I think you are talking about x++
+ 3
Simply put, x += y acts like x = x + y.
But isn't this explained in the lesson? try to review operators chapter please, might help đ
+ 3
Let's take an example,
X+=y
Which means,
X=X+y
Hope it will be helpful to you đ
+ 1
It just means use my current value and add this value to it
+ 1
Thank you guys â¤ď¸
+ 1
It's just a simpe way of writing x = x + 1 in any programming language