Skip to content

Instantly share code, notes, and snippets.

@aaronpowell
Created April 19, 2017 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronpowell/196842fb0d09cbbfe000317ebcb99e07 to your computer and use it in GitHub Desktop.
Save aaronpowell/196842fb0d09cbbfe000317ebcb99e07 to your computer and use it in GitHub Desktop.
Abusing JavaScript async
function async(async) {
return new Promise(res =>
setTimeout(() => (console.log(async), res()), 1000)
);
}
async function await() { await async('hello'); }
await();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment