Can someone elaborate the += thing to me?
Thank you ❤️
1/3/2021 3:52:27 PM
x += 7
is the same as if we write
x = x + 7
It is just a shorter version.
Abbakar_ah💻💻 I think you are talking about x++
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 👍
Let's take an example,
Hope it will be helpful to you 🙂
It just means use my current value and add this value to it
Thank you guys ❤️
It's just a simpe way of writing x = x + 1 in any programming language
Send us a message