Skip to content

Instantly share code, notes, and snippets.

@rbren
Last active Dec 11, 2018
Embed
What would you like to do?
let itemIDs = [1, 2, 3, 4, 5];
itemIDs.reduce((promise, itemID) => {
return promise.then(_ => api.deleteItem(itemID));
}, Promise.resolve());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment