Shorthand notation
We can use the shorthand notation a += b
for a = a + b
. Similar shorthand notation includes -=
and so on.
Other shorthand notation uses x++
for x = x + 1
and x--
for x = x - 1
.
Guess the results before looking at the consoleA window used for debugging, usually not visible on the page..
Note:
Hints:
- undefined
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
var first = 10, second = 100;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX