Object.prototype.toString.call(Uint8Array.prototype) throws a TypeError

Jason Orendorff jason.orendorff at gmail.com
Fri Aug 29 11:57:50 PDT 2014


On Fri, Aug 29, 2014 at 5:09 AM, Andrea Giammarchi
<andrea.giammarchi at gmail.com> wrote:
> Wouldn't that be inconsistent with `{}.toString.call(String.prototype)` and
> all others ?

It is inconsistent, but it's a change TC39 deliberately chose to take.

It's a good change. The fact that Date.prototype is a real Date
object, for example, has been a common source of bugs and general
weirdness.

-j


More information about the es-discuss mailing list