function A() {
this.name = "hunk xu";
this.other = function() {}
}
A.prototype = {
add() {}
}
console.log(new A());
console.log(Object.create(A.prototype));
打印結果:
FR:徐海濤(hunk Xu)
QQ技術交流羣:386476712
function A() {
this.name = "hunk xu";
this.other = function() {}
}
A.prototype = {
add() {}
}
console.log(new A());
console.log(Object.create(A.prototype));
打印結果:
FR:徐海濤(hunk Xu)
QQ技術交流羣:386476712