Skip to content

Instantly share code, notes, and snippets.

View davidbecker6081's full-sized avatar

David Becker davidbecker6081

  • Vail, CO
View GitHub Profile

Writing and Working With Promises

For this assignment, you'll be reintroduced to Promises and then write your own!

Some Background

Asynchronous code is everywhere in JavaScript, and Promises are a tool that enable us to work with asynchronous code in a manageable way. You've probably consumes promises before, most likely when you used the fetch API, but how are they working under the hood. With fetch, you most likely used something like this for a GET request:

fetch('http://www.some-api/users')