What is the difference between an object and a prototype in prototypal programming?

后端 未结 2 1272
南笙
南笙 2021-02-02 11:39

I\'m trying to understand the \"JavaScript way\" of creating and using objects and I think I\'m running into a misunderstanding of an object and a prototype.

In a new pr

2条回答
  •  無奈伤痛
    2021-02-02 12:15

    A prototype is just an object.

    It's any object that another object uses as it's prototype.

提交回复
热议问题