20190104-姚强
Opened this issue · 0 comments
yaofly2012 commented
理解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) // 猜猜输出什么
Opened this issue · 0 comments
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) // 猜猜输出什么