function Person(age,name){ this.age=age; this.name=name; if(typeof Person._initialized=='undefined'){ Person.prototype.showName=function(){ console.log(this.name); } Person._initialized=true; } }