Interview GURU

What does the isNaN() function?

The isNan() function returns true if the variable value is not a number. For example:

function number(num) {  
  if (isNaN(num)) {  
    return "Not a Number";  
  }  
  return "Number";  
}  
console.log(number('1000F'));  
// expected output: "Not a Number"  
  
console.log(number('1000'));  
// expected output: "Number"