5

Possible Duplicate:
Why does Chrome Dev Tool show a dates __proto__ as Invalid Date?

I get a weird message when I look up the prototype of the Date object:

Date.prototype; // Invalid Date

This is strange; why am I not getting the object from the prototype of Date as expected? Furthermore, the message that it returns is a string, but typeof(Date.prototype) returns "object". I also find that peculiar. Why am I getting this output?

4

1 回答 1

3

15.9.5 Properties of the Date Prototype Object

The Date prototype object is itself a Date object (its [[Class]] is "Date") whose [[PrimitiveValue]] is NaN.

NaN is what's happening

于 2013-01-29T17:24:10.687 回答