© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Bhojendra Rauniyar
Software Engineer
If you want to check NaN equal to NaN:
isNaN(+NaN) === isNaN(+NaN)
For eg.:
const a = 'asdf234' const b = 123 const c = '234asf' console.log(isNaN(+a) === isNaN(+b)) // false console.log(isNaN(+a) === isNaN(+c)) // true