+ 14
Why we use I++ ,+i and --i
Solve
3 Antworten
+ 4
They're used to increase or decrease the value by one
for ex.
i=0
i++
Alert(i)
//outputs 1
i =0
i--
Alert(i)
//outputs -1
+ 6
You don't need to. it's just preferred when iterating
+ 4
These are the post & pre increment (++) , and decrement operator(--) which is mostly used for 'loops' like for, while and dowhile