码迷,mamicode.com
首页 > 其他好文 > 详细

关于prototype和__proto__ 以及 constructor的文字总结

时间:2016-12-15 12:00:00      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:highlight   str   文字   函数   const   function   type   rip   ons   

//函数的construct 指向了 function Function(){}
undefined
//实例化的对象 constructor 指向 函数本身
undefined
//每个函数都有prototype属性
undefined
//实例化的对象都有__proto__ 属性
undefined
//其中实例化中__proto__ 和  函数中prototype的指向是 同一个原型对象  默认指向是一致的  当然也是可以改变的

  

关于prototype和__proto__ 以及 constructor的文字总结

标签:highlight   str   文字   函数   const   function   type   rip   ons   

原文地址:http://www.cnblogs.com/zhujiasheng/p/6182263.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!