DE
Size: a a a
DE
DE
НС
НС
НС
DE
DE
НС
> class A { static get foo() { return ['a'] } }
undefined
> class B extends A { static get foo() { return ['b'] } }
undefined
> const trace = x => { for (let c = x.constructor; c !== null; c = Object.getPrototypeOf(c)) if (c.foo) console.log(c.foo) }
undefined
> const x = new B
undefined
> x.foo
undefined
> x.constructor.foo
[ 'b' ]
> trace(x)
[ 'b' ]
[ 'a' ]
undefined
>S
> class A { static get foo() { return ['a'] } }
undefined
> class B extends A { static get foo() { return ['b'] } }
undefined
> const trace = x => { for (let c = x.constructor; c !== null; c = Object.getPrototypeOf(c)) if (c.foo) console.log(c.foo) }
undefined
> const x = new B
undefined
> x.foo
undefined
> x.constructor.foo
[ 'b' ]
> trace(x)
[ 'b' ]
[ 'a' ]
undefined
>
НС
НС
НС
НС
DE
DE
НС
super(...arguments)НС
НС