Skip to content

Instantly share code, notes, and snippets.

View RyanPWalker's full-sized avatar
😃
Working hard and Playing hard

Ryan Walker RyanPWalker

😃
Working hard and Playing hard
View GitHub Profile
// PROMISES!
// There are two ways to work with promises.
// Option 1 the easiest once you understand it.
// JavaScript has a feature called Async-Await
// Notice the *async* keyword before function
async function asyncPattern() {
// In async functions, you can get the result of
// promises without .then. Just stick a 'await'
// in front of it and it will wait for the promise