var stringIThoughtWasNumber = "10";
stringIThoughtWasNumber – 1
It's an error, but the result that's returned is the one I'm expecting. So, naturally,
stringIThoughtWasNumber + 1
stringIThoughtWasNumber - (-1)
stringIThoughtWasNumber + (-1)
and so on. Adding a value to the string returns a string, and subtracting returns a number.
blog comments powered by Disqus