I am debugging someones else code now and I am just confused when he defines constructor in these two modes. Is there anything special between the two?
//constructor 1
var MyObject = function(){
};
//constructor 2
var MyObject = function MyObject(){
};
Also, whats the effect of just creating a function just like this.
function MyObject(){};
I am just looking at certain use cases for each.