Skip to content

Instantly share code, notes, and snippets.

@lloss
Last active April 14, 2017 21:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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