Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript some body can explain Reply To: some body can explain

#146017

Shouldn’t it be :

Person.prototype.getName2=function () {
return this.name1;
}

When I added the “prototype” it worked for me.