Skip to content

Instantly share code, notes, and snippets.

Sandro Padin spadin

Block or report user

Report or block spadin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
spadin / sequential-promises.js
Created Jan 31, 2019
Run promises sequentially using Array#reduce
View sequential-promises.js
const sayHelloIn = (seconds) => () => new Promise((resolve, reject) => {
setTimeout(() => {
console.log(`Hello ${seconds} seconds later.`)
}, seconds * 1000);
const sequentially = async (fns) => {
You can’t perform that action at this time.