不知為什么照著老師寫一直是 (intermediate value) init is not a function報錯解決方法
最后自己把extend方法換成了
lightHalf.prototype = Object.create(light.prototype);
lightHalf.prototype.constructor = lightHalf;
這種繼承方法才得已解決,
最后自己把extend方法換成了
lightHalf.prototype = Object.create(light.prototype);
lightHalf.prototype.constructor = lightHalf;
這種繼承方法才得已解決,
2017-09-01
舉報
2017-09-24
可能是你的init()方法寫錯了