search

Home  >  Q&A  >  body text

Can there be only one method in an object?

Does an object have only one method or can it have multiple methods?

不愿透露姓名的谌子轩同学不愿透露姓名的谌子轩同学2187 days ago1272

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2018-12-11 11:04:25

    You can add any number of methods to an object. However, it is recommended to add shared methods or other members to the prototype object of the object constructor to improve efficiency

    reply
    0
  • 不愿透露姓名的谌子轩同学

    OK, thank you teacher

    不愿透露姓名的谌子轩同学 · 2018-12-11 11:05:23
  • Cancelreply