var fallback = function(e) {
alert('Error: ' + e);
};
var requests = categories.map(function(subcat) {
getItemLinksOfCat(url, subcat)
});
var arrAsync = [requestsm, fallback]
ats(arrAsync);
console.log("next code")
and here is the message:
TypeError: ats is not a function
at Object.<anonymous> (/Users/loctv/solution.js:164:1)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:279:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:696:3)
I got this issue the first time I tried,
here is the import
here is the code that use ats:
and here is the message: