javascript - Setting up a Promise - Getting "Missing ) after argument list" -
for life of me, cannot find syntax error in bit of code:
uncaught syntaxerror: missing ) after argument list
promisearray.push( new promise(function (resolve, reject) { runowsls("invoice", beginning2014months[i], closing2014months[i], "no", function (callbackresp) { invoice2014header[i] = callbackresp; resolve(); }); }); );
remove second-to-last semi-colon:
promisearray.push( new promise(function (resolve, reject) { runowsls("invoice", beginning2014months[i], closing2014months[i], "no", function (callbackresp) { invoice2014header[i] = callbackresp; resolve(); }); }) );
your original code was, essentially: promisearray.push(new promise(););
can better see incorrect on abbreviated one-line here.
Comments
Post a Comment