Wednesday, May 2, 2012

Javascript Woes - NaN

Just think about this:
isNaN('');
// false

parseInt('');
// NaN

parseInt(+'');
// 0
I found a bug in knockout's documentation and after reviewing the code, I found that this was the root of the confusion. I'm happy to leave you confused as well :)

0 comments:

©2009-2011 Mike Gleason jr Couturier All Rights Reserved