This NaN is not NaN:
The program code is as follows:
If it is NaN, then the if judgment will return true or "", but a strange scene happened,
The code shows that the if judgment returns false, and the result of the console also illustrates this:
It can be seen that date = NaN, but! date is false,!NaN is true, my first reaction is, is it a JS bug?
Then I did some tests
This shows that the getFullYear of date exists, then date is an object
This also shows that date is an object instead of NaN, which is just a problem of the IE debugger
date.getFullYear() =》NaN
date.getDate() =》NaN
These NaN are real NaN
Summary:
New Date('date text' under ie ) is a special date object, but the IE debugger displays it as NaN, and any method that returns number will return NaN.