构造函数三段论

1.在函数体最前面隐式地加上this = {}


2.执行 this.xxx = xxx;


3.在函数最后隐式return this

posted @ 2019-12-06 17:21  另一场风花雪月  阅读(152)  评论(0)    收藏  举报