上代碼:varfuncs=newArray();functionprintHello(){console.log("Hello!");}functionprintFine(){console.log("Fine!");}funcs.push(printHello);funcs.push(printFine);console.log(funcs.length);for(funcinfuncs){//UncaughtTypeError:Property'func'ofobject[objectObject]isnotafunctionfunc();}瀏覽器載入的時候,報的錯已經標記在注釋里。請問放在數組中的函數應該怎么調用?
Javascript的函數不能存在數組中嗎?
幕布斯6054654
2019-04-07 11:18:22
