yaofly2012/teamShare

20190104-姚强

Opened this issue · 0 comments

理解new的执行过程

function A() {}
A.prototype.n = 1;
var b = new A();
A.prototype = {
    n: 2,
    m: 3
}
var c = new A();
console.log(b.n, b.m, c.n, c.m)  // 猜猜输出什么