Friday, August 10, 2012

JavaScript isNaN() Coerces Values When Testing For Numbers

JavaScript isNaN() Coerces Values When Testing For Numbers: Recently, I was tripped up in my JavaScript debugging due to the way that the isNaN() (ie. is "not a number") function treats its argument. I was trying to track down an elusive bug that would occasionally present a numeric ID as the empty string (""). To figure out why this was happening, I put an isNaN() check in place in order to perform logging. Except, the error kept happening and no logging was being performed. After debugging my debugging code ( ironic !), I discovered tha ... Read More »

DIGITAL JUICE

No comments:

Post a Comment

Thank's!