Suppose I have the following function:
var A = function() {
var label = "hello";
return {
getLabel: function() { return label; }
}
};
Is there any difference between:
var a = A();
and
var a = new A();
?
NB: I'm not asking here what is the 'new' keyword in JavaScript, but how it behaves in this particular example.