+ 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