I'm doing decision based on dictionary key, i have only two types of keys, numeric and alpha,
var _dict = { 'a':'one', 'b':'two', '1':'three' };
$.each( _dict, function( key, value ){
if( parseInt( key ) === NaN ) {
// this statement always evalute to false
} else {
}
});
if i print console.log(parseInt('a'))
, it will also return NaN
I alreay found the solution from this question javascript parseInt return NaN for empty string
But i was wondering why it always evaluates to false.