@bz_moz Is this the implicit conversion to string thing again? "foo" + 5 - 3 -> "foo5" - 3 -> NaN, "foo" + (5 - 3) -> "foo" + 2 -> "foo2" ?
-
-
-
@ejpbruel That, and also try [] + 5 - 3 vs [] + (5-3)
End of conversation
New conversation -
-
-
@bz_moz What prompted this PSA? -
@jruderman IRC discussion where someone did console.log(somestring + num1-num2).
End of conversation
New conversation -
-
-
@bz_moz because of string => number conversion, you mean? -
@FremyCompany@bz_moz Almost. If a is a string and b is a number, the result is NaN. - 1 more reply
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.