what does ++ do? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what does ++ do?

11th Jun 2016, 1:32 PM
Austin Taylor
Austin Taylor - avatar
4 Answers
+ 1
increment your number by 1.
16th Jun 2016, 4:30 AM
hani chrife
hani chrife - avatar
0
it adds one to the number. for (i=0;i <10;i++){ alert (i); } i++ is a shortcut that means i=i+1 therefore the value of i increases during the loop.
11th Jun 2016, 1:39 PM
ari
0
just let x+1
17th Jun 2016, 7:54 AM
李易享
李易享 - avatar
0
i++ is post increment and ++i is pre increment.Suppose var a=5;a++; Here post increment the value of 5 is assigned to a and incremented by 1; whereas if there was ++a instead of a++ , pre increment the value of a is first incremented and then assigned to a
25th Jul 2016, 5:51 PM
Subham Kamalapuri
Subham Kamalapuri - avatar