Can anyone discuss on pre and post increments? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can anyone discuss on pre and post increments?

10th Oct 2017, 4:33 PM
Aimal Yousufi
Aimal Yousufi - avatar
2 Answers
+ 1
Let var a = 0; if you do var b = a++; b will get a's value then a will increment (b = 0 and a = 1) if you do var b = ++a; a will increment then b will get a's value (b = a = 1)
10th Oct 2017, 4:38 PM
Dapper Mink
Dapper Mink - avatar
+ 1
great point got
10th Oct 2017, 4:40 PM
Aimal Yousufi
Aimal Yousufi - avatar