check if value is NaN
import math
print math.isnan(float('NaN'))OutputTrue
print math.isnan(1.0)OutputFalse
Number.isNaN(123)let b=1
let n=readline()
if(isNaN(b)){
console.log("You typed 0!")
}else{
console.log("You did not type 0!")
}
Also in JavaScript:
- reverse a linked list javascript
- js match true false
- js add item to array
- how to check if 2 images are touching js
- cypress backspace
- moving letters animation javascript
- how to delete cookie node js
- servicenow json insert
- jquery array compare values
- difference between key and code in javascript
- jquery extract number from string
- javascript how to check if image exists
- how to draw a horizontal line in javascript
- create next js app yarn
- json minecraft
- settimeout in vuejs
- how to add redirec router in angular
- hello world in javascript
- js number 2 decimal places
- nodejs function example
- how to take create array using jquery
- javascript remove the current tr with click
- run length encoding javascript
- how to use a js class in react