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

update the story of fruit picker exercise #1826

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions exercises/concept/fruit-picker/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Instructions

You are creating a new online portal for your patrons to order their fruit fresh from the grocer. The grocer has an API that you can use to see if they have the inventory desired by your customers. You need to create a small library of functions for interacting with the grocer's API.
As an online fruit seller, you will have to manage your stock inventory according to your customers so you can give them fresh fruits as quickly as possible. To keep things simple, you created the grocer's API, and now, you need to write a small functions library that will interact with your API and give you quick good results.

You are creating a e-commerec

## 1. Create a callback to be called when the order is successful

Write a callback function called `onSuccess` to be called when the order is successful. It should invoke the imported `notify` function passing a success message to it.
Write a callback function name `onSuccess` which should invoke the import `notify` function.You have to return a `SUCCESS` message when the order is successful.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean named / with the name and imported?


```javascript
onSuccess();
Expand All @@ -13,7 +15,7 @@ onSuccess();

## 2. Create a callback to be called when the order fails with an error

Write a callback function called `onError` to be called when the order encounters an error. It should invoke the imported `notify` function passing an error message to it.
Write a callback function name `onError` which should invoke the import `notify` function.You have to return an `ERROR` message when the order encounters an error.

```javascript
onError();
Expand Down