Yeah, spot on basically. The only thing to add is that you should prototype methods on. How you proto can be situational to the design, I generally prefer to do this internally to the class, but flagged so it only runs when required, and only the once.
NAMESPACE.Person = function() {
this.name = "";
this.gender = "";
this.age = 0;
if(!NAMESPACE.Person._prototyped)
{
NAMESPACE.Person.prototype.MethodA = function () {};
NAMESPACE.Person.prototype.MethodB = function () {};
NAMESPACE.Person.prototype.MethodC = function () {};
NAMESPACE.Person._prototyped = true;
}
}
Explaining why: The reason for this is performance and inheritance. Prototyped properties are directly associated with the class (function) object rather than the instance, so they are traversable from the function reference alone. And because they are on the class, only a single object needs to exist, not one per instance.