+ 2
How do you add in a different order other than i++ ?
I’m a Rookie to JavaScript and I’m really interested to know how do u add number in, 2’s and 3’s and 4’s or any other synonymous way other than i++! I hope someone will come with a great example along with explanation ! Thanks in advance 😁
2 Answers
+ 1
i+=3
for example, which is equivalent to
i = i + 3;
Works with variables and different operators too. Examples:
i*=7;
i%=2;
i\=x;
+ 1
Oh wow ! That’s cool
Thank You So Much @Kai Schlegel 🙌🏻