Created
March 8, 2018 00:11
-
-
Save adambene/5b8f08e2f8a84c924a250e2a0f6d6cef to your computer and use it in GitHub Desktop.
Delay With a Value in JavaScript
This file contains hidden or 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
const delay = (ms, result) => | |
new Promise(resolve => setTimeout(() => resolve(result), ms)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment