> "b" + "a" + + "a" + "a" // output: "baNaNa"
Here is sample output from playground
Is this really mysterious?
baNaNa, which goes like:
Yup, baNaNa is made out of a
NaN, let me show it to you visually
Here comes the twist, the next I will be adding + "a" or
+ + "a"
Here is how NaN kicks into the console, that's obvious if you read closely that what I did.
I added + "a" to ba which turned to
b a NaN
'b' + 'a' + +'a' + 'a'; // turned into 'b' + 'a' + +'a' + 'a'; // (+"a") is treated as numeric due to an addition symbol, where a is not a number, (+ "a") === NaN.