所以我有一個非常簡單的代碼:// doesn't matter, just be sure that we have an arrayconst tasks = Array.isArray(result) ? [...result] : [result];// worksfor (let i = 0; i < tasks.length; i++) { this.executeNativeCommand(tasks[i].command, ...tasks[i].args);}// TypeError: this.executeNativeCommand is not iterable (cannot read property Symbol(Symbol.iterator))tasks.forEach(task => { this.executeNativeCommand(task.command, ...task.args);});也試過了 - 它有效。這是什么魔法?this['executeNativeCommand']
類型錯誤:(fn)在僅執(zhí)行函數(shù)時不可迭代
慕村9548890
2022-09-02 21:21:35