Last active
April 4, 2018 00:55
-
-
Save adambene/848fbda7f375a6005b91a84b3c1b3914 to your computer and use it in GitHub Desktop.
Delays With Async/await 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
async function delays() { | |
let a = await delay(800, "Hello, I'm in an"); | |
console.log(a); | |
let b = await delay(400, "async function!"); | |
console.log(b); | |
} | |
delays(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
const
, please