bshanz
November 7, 2022, 1:23pm
1
I believe there is an issue with the Fruit Picker learning exercise about callbacks. Link here.
For the first two tasks, the given hints have nothing to do with the question or answer. For example, the task one hint says to use the checkStatus API function, which in actually is not required to solve the problem.
Here are the task 1 and 2 solutions which have nothing to do with the above:
// task 1 solution
export function onSuccess() {
return notify({ message: 'SUCCESS' })
}
// task 2 solution
export function onError() {
return notify({ message: 'ERROR' })
}
I haven’t solved task 3 and 4 yet, but have a feeling it would be the same issue for them.
If it’s not a bug, it’s super confusing. Can someone please confirm?
iHiD
November 7, 2022, 4:27pm
2
(cc @SleeplessByte for magic)
There is an open issue about this exact… issue!
opened 06:14PM - 10 Jul 22 UTC
bug
x:action/fix
x:knowledge/none
x:module/concept-exercise
x:status/claimed
x:type/content
x:size/small
Related but not covered by #1818,
The hints have not been updated in #1725. F… or example, the first task:
```text
- Use the imported API function checkStatus in your function.
- Pass a callback function to checkStatus. It should expect to receive a string argument.
- Return the result from the checkStatus API function.
```
But the correct implementation is:
```javascript
export function onSuccess() {
notify({ message: 'SUCCESS' })
}
```
The hints.md file can be found here: https://github.com/exercism/javascript/blob/main/exercises/concept/fruit-picker/.docs/hints.md
General information of how to write the hints.md file can be found here: https://exercism.org/docs/building/tracks/concept-exercises#h-file-docs-hints-md
And last week a PR was provided:
exercism:main
← triangletrianglesquareplusx:fruit-picker-hints-reworked
opened 02:32PM - 31 Oct 22 UTC
Hello, this related to #1833. Updated hints.md and tried to be more exact. Pleas… e let me know if you dislike anything, I really like your project and want to help more.
PS. I have been taught that it is a good idea to first merge main into whatever my branch is and THEN do the pull request at the end. Do you like doing that as well?
Once this is merged, the issue should be resolved.
bshanz
November 7, 2022, 5:15pm
4
Thanks for the update! Do we know if this is the case in any other lessons as well? Just want to be aware if possible.
I don’t think it’s the case for any other current concept exercises