Resolve promises one after another (i.e. in sequence)?
Update 2017: I would use an async function if the environment supports it: async function readFiles(files) { for(const file of files) { await readFile(file); } }; If you’d like, you can defer reading the files until you need them using an async generator (if your environment supports it): async function* readFiles(files) { for(const file of … Read more