js check number or not code example
Example: To check if a value is a number in JavaScript
const value = 2
isNaN(value) //false
isNaN('test') //true
isNaN({}) //true
isNaN(1.2) //false
const value = 2
isNaN(value) //false
isNaN('test') //true
isNaN({}) //true
isNaN(1.2) //false