Properties of Javascript function objects
I’m not sure this will answer your question but may give you some insight. Consider the following example: var Person = (function () { var Person = function (name) { this.name = name; } Person.greet = function () { console.log(“Hello!”); } Person.prototype = { greet: function () { console.log(‘Hello, my name is ‘ + this.name); … Read more