NaN

Out of context: Reply #9

  • Started
  • Last post
  • 10 Responses
  • Fariska0

    NaN usually is given as result of an operation in which between the two operator, one is not a number, and the result is obviously Not a Number (ie: when you try to add a number to a string, you (usually) perform a concatenation, not an addition)
    you check this with isNan() method

    undefined is when something does not exists, for me is the thirb boolean value (in addition to true and false)

    useful to check variables:
    if ( myVar==undefined){
    myVar = myvavlue
    }

View thread