From 3e0d01fa692bba728abd9d976e606d90a193087d Mon Sep 17 00:00:00 2001 From: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:04:55 -0700 Subject: [PATCH] fix(curriculum): minor improvements to Calculator Workshop (#56600) --- .../workshop-calculator/66cc06012e46aa6bc9b8c001.md | 1 - .../workshop-calculator/66cc095dfe1682753d2ab030.md | 4 ++-- .../workshop-calculator/66cc0a9e06e00b75d6782be9.md | 2 +- .../workshop-calculator/66cc0f1ae40802781b2ea972.md | 2 +- .../workshop-calculator/66cc12fa504b0479dac479a0.md | 4 ++-- .../workshop-calculator/66cc1ccfefdd727e18c2ab20.md | 2 +- .../workshop-calculator/66cc1deb1f04647f2aabee2b.md | 4 ++-- .../workshop-calculator/66cc21d23238dc8240a8a182.md | 1 - 8 files changed, 9 insertions(+), 11 deletions(-) diff --git a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc06012e46aa6bc9b8c001.md b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc06012e46aa6bc9b8c001.md index 1a603c924fe..7c22304cb60 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc06012e46aa6bc9b8c001.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc06012e46aa6bc9b8c001.md @@ -27,7 +27,6 @@ Start by creating a function called `addTwoAndSeven`. You can choose to use the regular function syntax or the arrow function syntax. - # --hints-- You should declare a function called `addTwoAndSeven`. diff --git a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc095dfe1682753d2ab030.md b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc095dfe1682753d2ab030.md index cc9f6f39d41..b93920791a0 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc095dfe1682753d2ab030.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc095dfe1682753d2ab030.md @@ -13,7 +13,7 @@ Here is a reminder of how to return a value from a function: ```js function myFunction() { - return 'Hello World'; + return "Hello World"; } ``` @@ -21,7 +21,7 @@ Inside your `addTwoAndSeven` function, return the sum of `2` and `7`. # --hints-- -Your `addTwoAndSeven` function should return the sum of `2` and `7` +Your `addTwoAndSeven` function should return the sum of `2` and `7`. ```js assert.strictEqual(addTwoAndSeven(), 9); diff --git a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc0a9e06e00b75d6782be9.md b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc0a9e06e00b75d6782be9.md index ca8be5544fe..40b63bb6545 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc0a9e06e00b75d6782be9.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc0a9e06e00b75d6782be9.md @@ -7,7 +7,7 @@ dashedName: step-3 # --description-- -In the previous lecture videos, you learned how to call(invoke) a function. Calling a function means to execute the code inside the function. +In the previous lecture videos, you learned how to call (invoke) a function. Calling a function means to execute the code inside the function. Here is a reminder of how to call a function: diff --git a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc0f1ae40802781b2ea972.md b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc0f1ae40802781b2ea972.md index fe53b3e9583..67b986fdc67 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc0f1ae40802781b2ea972.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc0f1ae40802781b2ea972.md @@ -14,7 +14,7 @@ A function parameter is a variable that is defined in the function's declaration Here is an example of a function that has a parameter: ```js -// The parameter is 'name' +// The parameter is `name` function greetUser(name) { return `Hello, ${name}!`; } diff --git a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc12fa504b0479dac479a0.md b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc12fa504b0479dac479a0.md index 928f7e0a565..c51ce51358e 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc12fa504b0479dac479a0.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc12fa504b0479dac479a0.md @@ -18,8 +18,8 @@ function greetUser(name) { } // function calls -greetUser('John'); // 'Hello John!' -greetUser('Jane'); // 'Hello Jane!' +greetUser("John"); // "Hello John!" +greetUser("Jane"); // "Hello Jane!" ``` Add a `console.log` that calls the `calculateSum` function with the arguments `2` and `5`. diff --git a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc1ccfefdd727e18c2ab20.md b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc1ccfefdd727e18c2ab20.md index 14259ce6d64..8554875a22e 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc1ccfefdd727e18c2ab20.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc1ccfefdd727e18c2ab20.md @@ -7,7 +7,7 @@ dashedName: step-14 # --description-- -Your `calculateQuotient` appears to working correctly but there is one case that you have not tested yet. +Your `calculateQuotient` appears to be working correctly but there is one case that you have not tested yet. Add a `console.log` that calls the `calculateQuotient` function with the arguments `3` and `0`. diff --git a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc1deb1f04647f2aabee2b.md b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc1deb1f04647f2aabee2b.md index d13cec9682b..abd7be54a8b 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc1deb1f04647f2aabee2b.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc1deb1f04647f2aabee2b.md @@ -13,11 +13,11 @@ The division by zero is not a valid operation in mathematics. To account for this edge case, you should update your `calculateQuotient` function to instead check if `num2` is zero. -If it is, the function should return the string `'Error: Division by zero'`. Otherwise, it should return the result of dividing `num1` by `num2`. +If it is, the function should return the string `"Error: Division by zero"`. Otherwise, it should return the result of dividing `num1` by `num2`. # --hints-- -Your `calculateQuotient` function should return the string `'Error: Division by zero'` if `num2` is zero. +Your `calculateQuotient` function should return the string `"Error: Division by zero"` if `num2` is zero. ```js assert.strictEqual(calculateQuotient(10, 0), 'Error: Division by zero'); diff --git a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc21d23238dc8240a8a182.md b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc21d23238dc8240a8a182.md index 7917101dd93..0fe34658034 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc21d23238dc8240a8a182.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-calculator/66cc21d23238dc8240a8a182.md @@ -20,7 +20,6 @@ Here is an example: // the exponent is 2 Math.pow(5, 2); // 25 - // using the exponentiation operator 5 ** 2; // 25 ```