Actually i am not getting the use of increment or decrement ??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Actually i am not getting the use of increment or decrement ???

21st Sep 2017, 12:53 AM
Om Anand
6 Answers
+ 5
In what language? a++ ++a a-- --a
21st Sep 2017, 12:59 AM
Daniel
Daniel - avatar
+ 5
As I wrote but with ; at the end. In this way, if you do that only for 'a' variable you can write ++a; or --a;
21st Sep 2017, 1:03 AM
Daniel
Daniel - avatar
+ 4
increment will increase the variable value by 1 and decrement-- will decrease it by 1
21st Sep 2017, 11:30 AM
vipanshi
vipanshi - avatar
+ 2
In JavaScript..
21st Sep 2017, 1:01 AM
Om Anand
0
--a decrements a before use a-- uses a before decrement
21st Sep 2017, 2:21 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar