Open yaofly2012 opened 5 years ago
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) // 猜猜输出什么
理解new的执行过程