1

Is there some difference in speed\performance\memory usage or something else?

function Foo(){}
Foo.prototype = {
    bar1 : function(){},
    bar2 : function(){}
}

and

function Foo(){}
Foo.prototype.bar1 = function(){};
Foo.prototype.bar2 = function(){};

and what's the difference for google closure compile between those two code blocks ?

Cœur
  • 37,241
  • 25
  • 195
  • 267
i.Nemiro
  • 150
  • 6

0 Answers0