1 + 2
3
1 + "2"
"12"
1 - "2"
-1
1 + 2 + "3"
"33"
"1" + 2 - "3"
9
1 - 2 + "3"
"-13"
1 - 2 - "3"
-4
JavaScript
-
-
Though that one's consistent & makes sense to me: >>> 'x' * 4 'xxxx' >>> '8' * 4 '8888'
-
It's consistent, but so is JS: >> 'x'+2 "x2" >> '2'+2 "22" Switching semantics for + vs. - is evil, though :)
-
Yeah, I think that switch & the unbidden treat-my-string-as-a-number are what irk me.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.