This commit is contained in:
编码猿
2025-09-11 08:58:10 +08:00
parent e4c0f23e8e
commit 923549154d

View File

@@ -136,7 +136,7 @@
Test.prototype = new Test2("测试2")
// 让子类型的原型的 constructor 指向子类型(为了修正 constructor 属性)
// Test.prototype.constructor = Test
Test.prototype.constructor = Test
var test = new Test("测试1")
console.log("test: ", test);
```