美文网首页
__proto__ VS. prototype in JavaS

__proto__ VS. prototype in JavaS

作者: 饥人谷_風逝 | 来源:发表于2017-04-04 20:38 被阅读0次

    This figure again shows that every object has a prototype. Constructor function Foo also has its own __proto__ which is Function.prototype, and which in turn also references via its __proto__ property again to the Object.prototype. Thus, repeat, Foo.prototype is just an explicit property of Foo which refers to the prototype of b and c objects.

    var b = new Foo(20);
    var c = new Foo(30);````
    What are the differences between __proto__ and prototype properties?
    
    ![Paste_Image.png](https://img.haomeiwen.com/i4766759/2dd51925ea01d038.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
    来源:http://stackoverflow.com/questions/9959727/proto-vs-prototype-in-javascript

    相关文章

      网友评论

          本文标题:__proto__ VS. prototype in JavaS

          本文链接:https://www.haomeiwen.com/subject/yvyzottx.html