The Now Platform® Washington DC release is live. Watch now!
Every once in a while, I run across something completely unexpected in JavaScript. This morning was one of those times.
In my code, I had the equivalent of this:
var x = 0;
if ('' == x)
gs.log('What the???');
else
gs.log('Ah, that was expected!');
var x = 0;
if ('' == '' + x)
gs.log('What the???');
else
gs.log('Ah, that was expected!');
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.