Forums

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

Home Forums JavaScript some body can explain

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #145750
    omryk
    Participant

    why i cant use the getName2 ()?
    Your text to link here…

    #146017

    Shouldn’t it be :

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

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.