Kincyr Score: 12980 @JP ah. for some odd reason, I thought the empty space caused the NaN but it was actually the extra plus sign. Posted 4 years ago Report Link Quote Reply
JP I miss the show so much @Kincyr "b" + "a" produces "ba", but +"a" produces NaN (Not a Number) because the “+” tries to coerce a to a number but its not doable. The NaN is then converted to a string "NaN", then the final a is appended. I think… Posted 4 years ago Report Link Quote Reply
Kincyr Score: 12980 @JP in that case, the second “a” becomes the last “a”. where does the third “a” go? Posted 4 years ago Report Link Quote Reply
JP I miss the show so much Knowing Javascript, that’s probably NaN, because in JS that makes sense. EDIT: I tested this in a JS console. If you type "b" + "a" + + "a" + "a" you’ll get "baNaNa" Which is perfectly logical in the JavaScript world. In any other language it’s a syntax error. Posted 4 years ago Report Edited 4 years ago Link Quote Reply
ah. for some odd reason, I thought the empty space caused the NaN but it was actually the extra plus sign.
"b" + "a"produces"ba", but+"a"produces NaN (Not a Number) because the “+” tries to coerceato a number but its not doable. The NaN is then converted to a string"NaN", then the finalais appended.in that case, the second “a” becomes the last “a”. where does the third “a” go?
"b" + "a" + + "a" + "a""baNaNa"Edited