Message from JavaScript discussions

October 2018

— 

new InstanceClass();
// methods created on every instance
new PrototypeClass();
// methods created once, when the class was defined

Message permanent page

— 

No, im not creating functions, im talking about assignment. if the function closed in upper scope, it wont be "created".

— Right, you'll just have the cost of a reference per object per function

— Still worse

— But not as bad

— The access will be faster, the object creation will be slower

— More memory will be used

— Yes

— That is beside the point

— Party's over🤤

— Https://youtu.be/2DGORN4xSGI

— Oh?