Skip to content

Instantly share code, notes, and snippets.

Created October 14, 2017 20:02
What would you like to do?
let lock;
const log = (msg) => {
lock = new Promise(async (resolve) => {
await lock;
setTimeout(resolve, 1000);
'hello world'.split('').forEach(log);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment