+ 3
Why's the output of the code below NaN?
And why isn't it any longer NaN when changing the first plus sign into minus or deleting the first Boolean or the null? https://code.sololearn.com/WHuYhCTJLIW1/?ref=app
1 ответ
+ 8
[]+false becomes a string and there isn't a - operation for strings so NaN. []-false converts false into a number to subtract. []-null converts null into a number to subtract. []+false+true string concatenates 'false' & 'true'.