+ 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 šŸ˜

27th Feb 2018, 9:29 AM
Raaja Thalapathy
Raaja Thalapathy - avatar
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;
27th Feb 2018, 3:02 PM
Kai Schlegel
Kai Schlegel - avatar
+ 1
Oh wow ! Thatā€™s cool Thank You So Much @Kai Schlegel šŸ™ŒšŸ»
28th Feb 2018, 12:34 PM
Raaja Thalapathy
Raaja Thalapathy - avatar