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 :)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.