MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

add __proto__ test

+13
+13
tests/__proto__.js
··· 1 + function ShapeA() {} 2 + const ShapeB = { 3 + a() { 4 + console.log('aaa'); 5 + } 6 + }; 7 + 8 + ShapeA.prototype.__proto__ = ShapeB; 9 + console.log(ShapeA.prototype.__proto__); // { a: [Function: a] } 10 + 11 + const shapeA = new ShapeA(); 12 + shapeA.a(); // aaa 13 + console.log(ShapeA.prototype === shapeA.__proto__); // true