On Thu, Jun 12, 2014 at 6:03 PM, C. Scott Ananian <[email protected]>
wrote:

> FWIW, in Chrome 36:
>
> ```javascript
> > Date.prototype.toString()
> "Invalid Date"
> > ({ toString: Date.prototype.toString }).toString()
> TypeError: this is not a Date object.
> > Number.prototype.toString()
> "0"
> > String.prototype.toString()
> ""
> > Boolean.prototype.toString()
> "false"
> > RegExp.prototype.toString()
> "/(?:)/"
> ```
>

Yes, that's how it's supposed to work according to ES5, and does in all
engines. Annex E.1 of ES6 notes that this changes.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to