var x = function (){
this.add = function (a,b){ return a + b;}
}
var x = function (){};
x.add = function (a,b){ return a + b;};
var x = function (){}
x.prototype.add = function (a,b){ return a + b;}
var x = {};
x.add = function (a,b){ return a + b;}
Can someone explain the difference between the various declarations above?
Thanks