Skip to content

Instantly share code, notes, and snippets.

@lloss
Last active April 14, 2017 21:28
Show Gist options
  • Save lloss/7369064023b29272103cdf13bb57b7dd to your computer and use it in GitHub Desktop.
Save lloss/7369064023b29272103cdf13bb57b7dd to your computer and use it in GitHub Desktop.
evil_for
const axios = require("axios");
const urls = ['https://github.com/mzabriskie/axios', 'https://discord.js.org'];
async function asyncLoadAllTheChunks() {
const resps = await Promise.all(urls.map(url=> axios.get(url)))
const [first, second] = resps;
console.log(`
тут первый ${first}
тут второй ${second}
и так далее, ну ты понял
`)
}
asyncLoadAllTheChunks()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment