As Herby mentioned, the result of the function Class() conforms to the best
practice of:
C.prototype.constructor === C
(Given a constructor function C.) The above assertion holds for all built-ins.
On Mar 21, 2012, at 20:13 , Axel Rauschmayer wrote:
> For example (IIRC, that’s what Allen’s class operator does, I’ve also seen
> similar functions on the web):
>
> function Class(proto) {
> let constr = proto.constructor;
> constr.prototype = proto;
> return constr;
> }
> let Point = Class({
> constructor: function (x, y) {
> this.x = x;
> this.y = y;
> }
> });
--
Dr. Axel Rauschmayer
[email protected]
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss