对于我的生活,我在这段代码中找不到语法错误:
参数列表之后的Uncaught SyntaxError:missing)
promiseArray.push(
new Promise(function (resolve, reject) {
runOWSLS("Invoice", beginning2014Months[i], closing2014Months[i], "no", function (callbackResp) {
invoice2014Header[i] = callbackResp;
resolve();
});
});
);
答案 0 :(得分:3)
删除倒数第二个分号:
promiseArray.push(
new Promise(function (resolve, reject) {
runOWSLS("Invoice", beginning2014Months[i], closing2014Months[i], "no", function (callbackResp) {
invoice2014Header[i] = callbackResp;
resolve();
});
})
);
您的原始代码基本上是:promiseArray.push(new Promise(););
,您可以更好地看到这里的缩写单行不正确。