Since you are not passing a number to it, it will convert it to a number. They all convert to 0 , which is 0 , not NaN
Number('') 0 Number('\n') 0 Number('\t') 0 isNaN(0) false
Note that NaN does not mean "not a JavaScript number." In fact, it is completely separate from JavaScript and exists in all languages ββthat support IEEE-754 floats.
If you want to check if something is javascript number, check
if (typeof value === "number") { }
source share