JS constructor

1.每个对象都有一个constructor,都指向创建该对象的方法。

2.function对象的prototype的constructor也是指向该方法。如果对prototype进行重写,constructor将消失,但可以

  显性添加constructor指向其函数对象。

参考:http://blog.csdn.net/chunqiuwei/article/details/22092551

原文地址:https://www.cnblogs.com/yqlog/p/5560169.html