Home › Forums › JavaScript › some body can explain › Reply To: some body can explain
August 7, 2013 at 10:33 am
#146017
Historical Forums User
Participant
Shouldn’t it be :
Person.prototype.getName2=function () {
return this.name1;
}
When I added the “prototype” it worked for me.