+ 1
Can sombody help me?
I didnt understand increment and decrement! Can sombody explain it?
2 ответов
+ 4
increment
$×=1;
$×++; is the same as $× = $× + 1;
decrement
$x=1;
$x--; is the same as $×= $× -1;
+ 1
It is short for increasing or decreasing an arithmetic value by 1,
this is post increment:
$a = 1;
$a++;
this is pre-increment:
++$a;
same with decrement, just replace ++ with --