Skip to content

Comment on JavaScript right on the hardwareparent

Comments

You know that you can just do

foo.prototype = { dothis: function(){}, dothat: function(){}

}

In the beginning I wrote it more like

foo.prototype.dothat = function(){} foo.prototype.dothis = function(){}

Which was a lot more ugly.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.