3 ms·
In JS you share the prototype. It's dishonest to say you share the methods. Of course in most instances you only want to share the methods as sharing objects an
by MatthewPhillips 15y ago
In JS you share the prototype. It's dishonest to say you share the methods. Of course in most instances you only want to share the methods as sharing objects and arrays isn't often useful, but that's the way JS works.
In a classical language the methods are shared and the non-function properties are copied. I would qualify this as a more than 10% difference.