例如   function a(){}   

   var b=new a(); 

 

  1. 这个时候 b的__proto__ 指向的就是a.prototype;
  2. a.prototype的__proto__指向的是Object.prototype;
  3. b的constructor  指向的也是 function a(){};
  4. 而 a  它的__proto__    指向  是  Function.prototype现在    Function.prototype. constructor  指向的是  Function(){};
  5.  上面的Function(){} 也有  __proto__  指向 Function.prototype  ;
  6.   Function.prototype的constructor指向的也是Function(){};
  7.         Function.prototype的__proto__ 同时又指向Object.prototype;
  8.        Object.prototype的  constructor  又是   Object;
  9.   这个 Object; 的  __proto__   又 指向的是 Function.prototype;
  10.        Object.prototypet的__proto__  是null
  11.   在补充一下   a.constructor指向的是 Function.  这个下面没有展示

     如图

说说自己对于原型链 __proto__ prototype constructor的理解说说自己对于原型链 __proto__ prototype constructor的理解

 

 

   以上纯自己理解  如有错误  麻烦 指出  谢谢!!

                                    2017-12-29

相关文章:

  • 2021-04-27
  • 2021-06-21
  • 2021-05-26
  • 2021-11-06
  • 2021-05-29
  • 2021-09-23
  • 2021-11-04
  • 2021-09-06
猜你喜欢
  • 2021-07-31
  • 2021-12-13
  • 2021-07-13
  • 2018-12-09
  • 2021-11-05
  • 2021-06-08
  • 2021-04-07
  • 2021-05-02
相关资源
相似解决方案