MyClass = function() {
var init = function() {
console.log("Initializing");
}
this.init();
}
var myInstance = new MyClass();
当我运行上述内容时,我得到
TypeError: Object [object Object] 没有方法'init'
MyClass = function() {
var init = function() {
console.log("Initializing");
}
this.init();
}
var myInstance = new MyClass();
当我运行上述内容时,我得到
TypeError: Object [object Object] 没有方法'init'