The Benefits of JavaScript Prototype

前端 未结 2 1230
情话喂你
情话喂你 2020-12-14 12:27

I\'ve been wondering about JavaScript\'s prototypal nature, and the benefits of it, and have come down to the following list :

1) Inheritance

2条回答
  •  孤城傲影
    2020-12-14 13:01

    http://en.wikipedia.org/wiki/Prototype-based_programming#Comparison_with_class-based_models

    Also, please see the discussion of prototype inheritance in the answers to this:

    prototype based vs. class based inheritance

提交回复
热议问题