Answers for "how to check is nan"

1

python check if nan

import math
x = float('nan')
math.isnan(x)
True
Posted by: Guest on August-30-2021
1

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

Python Answers by Framework

Browse Popular Code Answers by Language