Answers for "javascript check if is nan"

6

javascript check if is nan

function isNaN(x) {
   return x !== x;
};
isNaN(NaN);//true
Posted by: Guest on August-05-2019
0

check if var is NaN

let b=1
let n=readline()
if(isNaN(b)){
  console.log("You typed 0!")
}else{
  console.log("You did not type 0!")
}
Posted by: Guest on April-23-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language