From d7fbff95bfc8763adb8eba6fb40c3f7fd6ef6f13 Mon Sep 17 00:00:00 2001 From: Aliwahid17 <88263575+Aliwahid17@users.noreply.github.com> Date: Sun, 3 Jul 2022 15:23:25 +0530 Subject: [PATCH 1/3] update the story of fruit picker exercise --- exercises/concept/fruit-picker/.docs/instructions.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exercises/concept/fruit-picker/.docs/instructions.md b/exercises/concept/fruit-picker/.docs/instructions.md index 9c41e710c7..8dc9a08189 100644 --- a/exercises/concept/fruit-picker/.docs/instructions.md +++ b/exercises/concept/fruit-picker/.docs/instructions.md @@ -1,6 +1,8 @@ # 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 From 86342b2cae71f4e3e3c688e1ae97f00c55cc6e8d Mon Sep 17 00:00:00 2001 From: Aliwahid17 <88263575+Aliwahid17@users.noreply.github.com> Date: Sun, 3 Jul 2022 17:22:57 +0530 Subject: [PATCH 2/3] rewrite the first and second test --- exercises/concept/fruit-picker/.docs/instructions.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/exercises/concept/fruit-picker/.docs/instructions.md b/exercises/concept/fruit-picker/.docs/instructions.md index 8dc9a08189..9946f10577 100644 --- a/exercises/concept/fruit-picker/.docs/instructions.md +++ b/exercises/concept/fruit-picker/.docs/instructions.md @@ -6,7 +6,8 @@ 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. ```javascript onSuccess(); @@ -15,7 +16,8 @@ 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(); From 8680e28bb76d43e127d1bc36bf7d91f119f7375e Mon Sep 17 00:00:00 2001 From: Aliwahid17 <88263575+Aliwahid17@users.noreply.github.com> Date: Sun, 3 Jul 2022 17:25:48 +0530 Subject: [PATCH 3/3] Update instructions.md --- exercises/concept/fruit-picker/.docs/instructions.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/exercises/concept/fruit-picker/.docs/instructions.md b/exercises/concept/fruit-picker/.docs/instructions.md index 9946f10577..78f5232ac3 100644 --- a/exercises/concept/fruit-picker/.docs/instructions.md +++ b/exercises/concept/fruit-picker/.docs/instructions.md @@ -6,8 +6,7 @@ You are creating a e-commerec ## 1. Create a callback to be called when the order is successful -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. +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. ```javascript onSuccess(); @@ -16,8 +15,7 @@ onSuccess(); ## 2. Create a callback to be called when the order fails with an error -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. +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();