I would think you might get 0
, maybe because the strings are turned to 1's
and the -
operator causes a subtraction operation to take place?
"1" - - "1";
Thanks in advance!
It's how math works
1 - (-1) = 1 + 1
The -
casts the string to a number and also acts as a minus sign.
1 - (-1)
= 1 + 1
= 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With