Frankie Bagnardi wrote:
I'm also expecting a lot of questions about 'what is this new.target thing in this code?', 'is new a variable?', 'where does it come from?', 'isn't new an operator?', etc.

if (this instanceof MyDate) ...

... is clearer, but I guess it needs to be disallowed because of the other rules.

It doesn't mean the same thing as new.target, of course. Also, new.target is not useful only as a predicate -- it is the original constructor that was new'ed.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to