new的时候都干了什么?

132 阅读1分钟
// new 干了四件事
    // 1.var obj={};
    // 2.obj.__proto__=test.prototype;
    // 3.test.call(obj); 
    // 4把obj的地址赋值给等式左边的变量