Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript check if is nan

function isNaN(x) {
   return x !== x;
};
isNaN(NaN);//true
Comment

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!")
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: test variable type javascript 
Javascript :: javascript trim spaces 
Javascript :: save token in localstorage 
Javascript :: javascript move last array element to first 
Javascript :: window closing event js 
Javascript :: get pods running on a node 
Javascript :: js wait 
Javascript :: Convert a string to a number in jQuery 
Javascript :: js transform 
Javascript :: how to create infinite loop in javascript 
Javascript :: set image as background react 
Javascript :: javascript transpose array 
Javascript :: cypress display timestamp in milliseconds 
Javascript :: javascript radio button onchange 
Javascript :: get number from range line js 
Javascript :: loop through map in js 
Javascript :: javascript change div order 
Javascript :: js get data from form 
Javascript :: execute javascript when page finished loading 
Javascript :: join two arrays angular 
Javascript :: jquery alert design 
Javascript :: ajax get form data 
Javascript :: toggle css class in javascript 
Javascript :: flatten in js without lodash 
Javascript :: javascript check if date object 
Javascript :: roblox headshot image js 
Javascript :: js today timestamp 
Javascript :: map to array javascript 
Javascript :: test if property exists javascript 
Javascript :: json merge 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =