I think the following code will make the question clear.
// My class var Class = function() { console.log(\"Constructor\"); }; Class.prototype = { method: fu
A simpler, cleaner way with no "factories"
function Person(name) { if (!(this instanceof Person)) return new Person(name); this.name = name; } var p1 = new Person('Fred'); var p2 = Person('Barney'); p1 instanceof Person //=> true p2 instanceof Person //=> true