+ 14

Why we use I++ ,+i and --i

Solve

2nd Jul 2020, 3:20 AM
TaNiSha[inÄçtïvë]
TaNiSha[inÄçtïvë] - avatar
3 Answers
+ 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
14th Jul 2020, 12:56 PM
Bot
Bot - avatar
+ 6
You don't need to. it's just preferred when iterating
2nd Jul 2020, 4:00 AM
♡Addy♡
♡Addy♡ - avatar
+ 4
These are the post & pre increment (++) , and decrement operator(--) which is mostly used for 'loops' like for, while and dowhile
10th Jul 2020, 8:11 AM
Ganne Gowtham
Ganne Gowtham - avatar