-
-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Exercise: Promises #932
Conversation
@slaymance before reviewing, can you make the CI's pass? |
Thanks <3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright. This is looking like a great addition to the practice exercises. I have no things you should change. I like it.
In order to merge (sorry!) two more things:
- move the
promises
folder intopractice
- then rebase (watch out:
package.json
has a keypractice
too, now) - run
npm i
in the root - run
ASSIGNMENT=practice/promises npx babel-node scripts/sync
in the root
As far as I'm concerned, it's mergable right after.
b2e9ec7
to
c586407
Compare
@slaymance I performed the tasks, added introduction, added .meta/config files and added you as the Author. Thanks for contributing :) |
I thought it would be useful to add an exercise which focuses on
Promise
s since they're such a core part of JS development. My idea was to ask learners to implement a function that behaves like NodeJS'sutil.promisify
, as well as thePromise
static helper methods in native JS:Promise.all
Promise.allSettled
Promise.race
Promise.any
I've included some tests for each function as a starting point and an example implementation of all the functions. I'd love some feedback and additional contributions. I think this would make a great language-specific exercise!