I was fiddling around with different things, like this
var a = 1, b = 2;
alert(a + - + - + - + - + - + - + - + b); //alerts -1
and I could
The Javascript parser is greedy (it matches the longest valid operator each time), so it gets the ++ operator from a++b, making:
(a++) b
which is invalid. When you put in spaces a + + b, the parser interprets it like this:
(a) + (+b)
which is valid and works out to be three.
See this Wikipedia article on Maximal munch for more details.