__proto__ VS. prototype in JavaScript

后端 未结 30 1910
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-21 06:14

This figure again shows that every object has a prototype. Constructor function Foo also has its own __proto__ which is Function.prototype, a

30条回答
  •  借酒劲吻你
    2020-11-21 06:46

    __proto__ is the base to construct prototype and a constructor function eg: function human(){} has prototype which is shared via __proto__ in the new instance of the constructor function. A more detailed read here

提交回复
热议问题