0
Can someone explain me about Increment & Decrement?
var++ / ++var / var--/ --var
3 ответов
+ 4
Pre increment and pre decrement will always solve first the post increment or decrement
Suppose
var =3;
var++/++var here values will be calculated like this
3/++4 highest priority of divide than why value will be increase but var++ will increase after solving this expression here values incrementing two times watch on YouTube you will understood much better.
Same for decrement
+ 1
Thank you
+ 1
The JavaScript Increment and Decrement Operators useful to increase or decrease the value by 1. For instance, Incremental operator ++ used to increase the existing variable value by 1 (x = x + 1). The decrement operator – – is used to decrease or subtract the existing value by 1 (x = x – 1).