0

What is the difference between i++ and i+1

for instance for(i=0;i<10;i++) and for(i=0;i<10;i+1)?

7th Jan 2017, 7:11 PM
Hasan Suhaimi
Hasan Suhaimi - avatar
2 Answers
+ 2
i += 1 there is no difference just a shortcut
7th Jan 2017, 7:36 PM
Uran Kajtazaj
Uran Kajtazaj - avatar
0
The difference is that i+1 doesn't work in JavaScript and you should use i++ instead.
7th Jan 2017, 7:34 PM
Mostafa Kerim
Mostafa Kerim - avatar