function getData(url) { return new Promise(...) } const urls = [url1, url2, ..., urln] function getDatas(urls) { } const p = getDatas(urls) p.then(function(results) { console.log(results); })