Skip to content
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

Multiple promises task instruction doesn't point toward the official solution #43

Open
ghost opened this issue Mar 11, 2015 · 1 comment
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Mar 11, 2015

The task description isn't very clear about how the different counters are supposed to function. From looking at the official solution, I gathered the following:

  1. Each individual promise should increment a counter passed to it each time it is called, and also increment the 'all' function's state counter which tracks how many times an individual promise is resolved.
  2. Once the statewide counter reaches the same number as the number of individual promises, the outermost 'all' promise should resolve (a la 'callback counting' from learnyounode).
  3. The 'all' promise should be returned so that the resulting state can be accessed and controlled externally.

However, the tests don't reinforce this either. Here is a gist that passes despite mostly missing the above three points.

@TimothyGu
Copy link
Collaborator

The official solution is only a pointer, and not how you NEED to do it. I agree that this should be worded more clearly though.

@TimothyGu TimothyGu self-assigned this Apr 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant