This change introduces new bonus exercises to the Advanced Promises session. Learners build gradually more complex functions over promises, culminating in a homemade implementation of Promise.all().
With makePromiseGetter(), learners see an example of a function that takes a promise and returns a function based on that promise that “sees” the current state of the promise. Learners verify their understanding by filling in the test cases so they pass.
With promiseBoth(), learners write a two-promise version of Promise.all().
With promiseAll(), learners extend promiseBoth() to work with an array of promises.
This change introduces new bonus exercises to the Advanced Promises session. Learners build gradually more complex functions over promises, culminating in a homemade implementation of
Promise.all()
.makePromiseGetter()
, learners see an example of a function that takes a promise and returns a function based on that promise that “sees” the current state of the promise. Learners verify their understanding by filling in the test cases so they pass.promiseBoth()
, learners write a two-promise version ofPromise.all()
.promiseAll()
, learners extendpromiseBoth()
to work with an array of promises.