JS: Difference of window.isNaN vs Number.isNaN
- The global
isNaNconverts the argument to number first. Number.isNaNdoes not.
🟢 TIP: use Number.isNaN. Never use the global one.
isNaN converts the argument to number first.Number.isNaN does not.🟢 TIP: use Number.isNaN. Never use the global one.