Created
June 8, 2018 18:01
-
-
Save PetrSnobelt/244ca929bcb6fb095b4d6da5b8a744d3 to your computer and use it in GitHub Desktop.
later promise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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