+ 2

x++, ++x, x--, - - x

What different? Example?? 😉

28th Dec 2016, 4:28 PM
Syifa Alfi S
Syifa Alfi S - avatar
3 odpowiedzi
+ 2
If you write ++ before the variable, the addition is made before the statement. If you write it after the variable, it is made after the statement. Example: // both x and y will be 4 var x = 3; var y = ++x; // x will be 4, y will be 3 var x = 3; var y = x++;
28th Dec 2016, 5:01 PM
Esau Perez
Esau Perez - avatar
+ 1
sudah kejawab tuh ☺
28th Dec 2016, 5:17 PM
Achmad Kumail Arif
Achmad Kumail Arif - avatar
+ 1
++x; // x = x + 1; return x; x++; // return x; x = x + 1;
29th Dec 2016, 12:35 AM
zakaria mouhid
zakaria mouhid - avatar