Stuck in Fruit Picker exercise

Hello there!
I am having some issue with this exercise. Specifically the third iteration. I 've noticed that there were some discussions about that but nevertheless i still cannot figure out how to solve it.
So here I am , shyly asking for help :melting_face:

Link here : Fruit Picker in JavaScript on Exercism

Hello :) Could you share the code you’ve tried so far and maybe explain a little about what you’ve tried or what exactly isn’t clicking? That’ll probably lead to someone being able to help you in the most appropriate way :)

2 Likes

Yes sure.
I have to say I am really in a blind spot with this one, as there’s something which I don’t get. I tried with a ternary operator but it’s of course not working. The hints says I have to use err(), but I don’t understand how I can check if the order has been received…

No need to feel shy - please feel free to ask for help, as that is the way we make progress :).

Regarding task 3, I do not understand why you need to use ternary operator. All you are asked to do is to call the external API function order with the params you have - query, and the 2 call backs.

Something like order(query, onSuccessCallback, onErrorCallback) would work.

Oh it was so simple! Thah makes total sense. Thank you very much!
:grinning:

2 Likes