Here is an example:
parseInt(50) > parseInt('a');
When executing this on a console, it will return false. My original code looks somewhat like this:
variableB = parseInt(jQuery('some-element').html());
if(parseInt(variableA) > variableB)
// do something
else
// do something else
Sometimes the some-element will not be filled and thus return NaN. When this happens, I do want the else block to be executed. I am actually getting what I expect, but I just want to make sure that it indeed is intended to work this way.
if(parseInt(variableA) > variableB && !isNaN(variableB))>,<or===isfalse;NaNis neither greater-than, less-than or equal to any number. And, dammit, next time I answer instead of commenting... >.<variableBto see if it is aNaNbefore continuing?