Skip to content

Instantly share code, notes, and snippets.

@joshmanders joshmanders/1.js
Last active Oct 6, 2016

Embed
What would you like to do?
const doSomething = () => new Promise((resolve, reject) => resolve('hi'))
doSomething().then((result) => console.log(result)) // hi
const doSomething = () => new Promise((resolve, reject) => resolve('hi'))
async function main () {
const result = await doSomething()
console.log(result) // hi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.