Skip to content

Instantly share code, notes, and snippets.

@LoganBarnett
Last active June 26, 2017 16:28
Show Gist options
  • Save LoganBarnett/4468ed7708f7137697118ef4d526db18 to your computer and use it in GitHub Desktop.
Save LoganBarnett/4468ed7708f7137697118ef4d526db18 to your computer and use it in GitHub Desktop.
try {
// the foo declaration is hoisted out of the try block so it can be accessible later
var foo = await getAsyncFoo()
}
catch(e) {
console.error('oh noes!', e.message)
}
foo.doSomeThings()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment