I would think that you can get 0, perhaps, because the lines are turned on 1's, and the operator -calls the subtraction operation?
0
1's
-
"1" - - "1";
Thanks in advance!
- prints a string to a number, and also acts as a minus sign.
1 - (-1)= 1 + 1=2
1 - (-1)
1 + 1
2
How math works
1 - (-1) = 1 + 1
1 - (-1) = 2. I do not see the problem? JavaScript will parse them as integers due to the minus sign, expecting math. This also happens if you multiply a number string by 1, otherwise the poor person is parseInt ().