Skip to content

Instantly share code, notes, and snippets.

@PetrSnobelt
Created June 8, 2018 18:01
Show Gist options
  • Save PetrSnobelt/244ca929bcb6fb095b4d6da5b8a744d3 to your computer and use it in GitHub Desktop.
Save PetrSnobelt/244ca929bcb6fb095b4d6da5b8a744d3 to your computer and use it in GitHub Desktop.
later promise
function later_ES5(delay) {
return new Promise(function(resolve) {
setTimeout(resolve, delay);
});
}
const later = delay => new Promise(resolve => setTimeout(resolve, delay))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment