From 0237352da5b87ab2b20d26be7dfa23c5ba8c21dc Mon Sep 17 00:00:00 2001 From: Farnooshmo <91014204+Farnooshmo@users.noreply.github.com> Date: Mon, 21 Nov 2022 16:29:13 +0000 Subject: [PATCH 01/11] Update 1-syntax-errors.js --- mandatory/1-syntax-errors.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mandatory/1-syntax-errors.js b/mandatory/1-syntax-errors.js index a10cc9ac2..f37791eb3 100644 --- a/mandatory/1-syntax-errors.js +++ b/mandatory/1-syntax-errors.js @@ -1,16 +1,16 @@ // There are syntax errors in this code - can you fix it to pass the tests? -function addNumbers(a b c) { +function addNumbers(a, b, c) { return a + b + c; } -function introduceMe(name, age) - return "Hello, my name is " + name "and I am " age + "years old"; - +function introduceMe(name, age) { + return "Hello, my name is " + name + " and I am " + age + " years old"; +} function getTotal(a, b) { - total = a ++ b; + total = a + b; - return "The total is total"; + return "The total is total" + total; } /* From 951e9a3694243980006f92266a90820798a9da85 Mon Sep 17 00:00:00 2001 From: Farnooshmo <91014204+Farnooshmo@users.noreply.github.com> Date: Wed, 23 Nov 2022 21:08:07 +0000 Subject: [PATCH 02/11] Mandatory completed! --- mandatory/1-syntax-errors.js | 2 +- mandatory/2-logic-error.js | 7 +++---- mandatory/3-function-output.js | 8 +++++--- mandatory/4-tax.js | 9 +++++++-- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/mandatory/1-syntax-errors.js b/mandatory/1-syntax-errors.js index f37791eb3..730b464ac 100644 --- a/mandatory/1-syntax-errors.js +++ b/mandatory/1-syntax-errors.js @@ -10,7 +10,7 @@ function introduceMe(name, age) { function getTotal(a, b) { total = a + b; - return "The total is total" + total; + return "The total is " + total; } /* diff --git a/mandatory/2-logic-error.js b/mandatory/2-logic-error.js index 9cca7603b..37c4ebc15 100644 --- a/mandatory/2-logic-error.js +++ b/mandatory/2-logic-error.js @@ -1,16 +1,15 @@ // The syntax for this function is valid but it has an error, find it and fix it. function trimWord(word) { - return wordtrim(); + return word.trim(); } function getStringLength(word) { - return "word".length(); + return word.length; } function multiply(a, b, c) { - a * b * c; - return; + return a * b * c; } /* diff --git a/mandatory/3-function-output.js b/mandatory/3-function-output.js index 5a953ba60..88e70ffce 100644 --- a/mandatory/3-function-output.js +++ b/mandatory/3-function-output.js @@ -1,16 +1,18 @@ // Add comments to explain what this function does. You're meant to use Google! +//The Math.random() in this function returns a random number between 0 up to 10; function getRandomNumber() { return Math.random() * 10; } // Add comments to explain what this function does. You're meant to use Google! + +// The concat() in this function, joins two strings as a new string; function combine2Words(word1, word2) { - return word1.concat(word2); + return word1.concat(" ", word2); } function concatenate(firstWord, secondWord, thirdWord) { - // Write the body of this function to concatenate three words together. - // Look at the test case below to understand what this function is expected to return. + return firstWord.concat(" ", secondWord, " ", thirdWord); } /* diff --git a/mandatory/4-tax.js b/mandatory/4-tax.js index ba77c7ae2..f1e3f9fa6 100644 --- a/mandatory/4-tax.js +++ b/mandatory/4-tax.js @@ -5,7 +5,10 @@ Sales tax is 20% of the price of the product. */ -function calculateSalesTax() {} +function calculateSalesTax(priceOfProduct) { + const salesTax = 0.2 * priceOfProduct; + return priceOfProduct + salesTax; +} /* CURRENCY FORMATTING @@ -17,7 +20,9 @@ function calculateSalesTax() {} Remember that the prices must include the sales tax (hint: you already wrote a function for this!) */ -function addTaxAndFormatCurrency() {} +function addTaxAndFormatCurrency(priceOfProduct) { + return "£".concat(calculateSalesTax(priceOfProduct).toFixed(2)); +} /* =================================================== From 5161b99c87953aa742bb01a54179d108a22dbcb0 Mon Sep 17 00:00:00 2001 From: Farnooshmo <91014204+Farnooshmo@users.noreply.github.com> Date: Fri, 25 Nov 2022 20:40:54 +0000 Subject: [PATCH 03/11] Exercises from A to F-strings- methods completed --- exercises/B-hello-world/exercise.js | 9 +++++++++ exercises/C-variables/exercise.js | 5 ++++- exercises/D-strings/README.md | 1 + exercises/D-strings/exercise.js | 5 ++++- exercises/E-strings-concatenation/README.md | 7 +++++++ exercises/E-strings-concatenation/exercise.js | 7 ++++++- exercises/F-strings-methods/exercise.js | 5 ++++- exercises/F-strings-methods/exercise2.js | 8 ++++++-- package.json | 12 +++++++++--- 9 files changed, 50 insertions(+), 9 deletions(-) diff --git a/exercises/B-hello-world/exercise.js b/exercises/B-hello-world/exercise.js index b179ee953..73280c266 100644 --- a/exercises/B-hello-world/exercise.js +++ b/exercises/B-hello-world/exercise.js @@ -1 +1,10 @@ console.log("Hello world"); +let greeting ="HEY!"; +console.log(greeting); +console.log("Hi, A newbie at JavaScript!"); +console.log("Hi, A newbie at JavaScript!"); +console.log("Hi, A newbie at JavaScript!"); +console.log("Hi, A newbie at JavaScript!"); +console.log('Hi, a newbie at JavaACript!'); +console.log(1); + diff --git a/exercises/C-variables/exercise.js b/exercises/C-variables/exercise.js index a6bbb9786..3fed63612 100644 --- a/exercises/C-variables/exercise.js +++ b/exercises/C-variables/exercise.js @@ -1,3 +1,6 @@ // Start by creating a variable `greeting` - +var greeting = `Hello guys! Welcome to JavaScript!`; +console.log(greeting); console.log(greeting); +console.log(greeting); + diff --git a/exercises/D-strings/README.md b/exercises/D-strings/README.md index fd0a664ae..4c107234b 100644 --- a/exercises/D-strings/README.md +++ b/exercises/D-strings/README.md @@ -15,6 +15,7 @@ var message = "This is a string"; var messageType = typeof message; console.log(messageType); // logs 'string' + ``` ## Exercise diff --git a/exercises/D-strings/exercise.js b/exercises/D-strings/exercise.js index 2cffa6a81..4c5d7baad 100644 --- a/exercises/D-strings/exercise.js +++ b/exercises/D-strings/exercise.js @@ -1,3 +1,6 @@ // Start by creating a variable `message` - +var message = "Read the instruction"; +var messageType = typeof message; console.log(message); +console.log(messageType); +console.log("This is a " + messageType); diff --git a/exercises/E-strings-concatenation/README.md b/exercises/E-strings-concatenation/README.md index cba54dbca..72694500a 100644 --- a/exercises/E-strings-concatenation/README.md +++ b/exercises/E-strings-concatenation/README.md @@ -7,14 +7,21 @@ var name = "Daniel"; var greeting = greetingStart + name; console.log(greeting); // Logs "Hello, my name is Daniel" + + ``` ## Exercise - Write a program that logs a message with a greeting and your name +var greeting = "Hello! Welcome "; +var name = "Daniel"; +var greetingSentence = geeting + name; + ## Expected result ``` + Hello, my name is Daniel ``` diff --git a/exercises/E-strings-concatenation/exercise.js b/exercises/E-strings-concatenation/exercise.js index 2cffa6a81..182dc6368 100644 --- a/exercises/E-strings-concatenation/exercise.js +++ b/exercises/E-strings-concatenation/exercise.js @@ -1,3 +1,8 @@ // Start by creating a variable `message` - +var message = "Hello, This is Farnoosh!"; console.log(message); +var myName = "Farnoosh"; +var myNameLenght = myName.length; +console.log(myNameLenght); +var messageOne = message + " My name is " + myNameLenght + " characters long!"; +console.log(messageOne); diff --git a/exercises/F-strings-methods/exercise.js b/exercises/F-strings-methods/exercise.js index 2cffa6a81..b1bcaf0cc 100644 --- a/exercises/F-strings-methods/exercise.js +++ b/exercises/F-strings-methods/exercise.js @@ -1,3 +1,6 @@ // Start by creating a variable `message` - +var message = "Read the instruction!"; +var messageType = typeof message; console.log(message); +console.log(messageType); +console.log("This is a " + messageType); diff --git a/exercises/F-strings-methods/exercise2.js b/exercises/F-strings-methods/exercise2.js index b4b46943d..c9959ef6f 100644 --- a/exercises/F-strings-methods/exercise2.js +++ b/exercises/F-strings-methods/exercise2.js @@ -1,3 +1,7 @@ -const name = " Daniel "; +var message = "Hello, This is Farnoosh!"; +var myName = "Farnoosh"; +var myNameTrim = myName.trim(); +var myNameLenght = myName.length; -console.log(message); +var messageTwo = message + " My name is " + myNameLenght + " characters long!"; +console.log(messageTwo); diff --git a/package.json b/package.json index 93e0861e3..9e7f2ffeb 100644 --- a/package.json +++ b/package.json @@ -14,15 +14,21 @@ "url": "https://github.com/CodeYourFuture/JavaScript-Core-1-Coursework-Week1/issues" }, "jest": { - "setupFilesAfterEnv": ["jest-extended"], + "setupFilesAfterEnv": [ + "jest-extended" + ], "projects": [ { "displayName": "mandatory", - "testMatch": ["/mandatory/*.js"] + "testMatch": [ + "/mandatory/*.js" + ] }, { "displayName": "extra", - "testMatch": ["/extra/*.js"] + "testMatch": [ + "/extra/*.js" + ] } ] }, From e2d11f594531e0bbffc5b24bc3d4e2df72cf1626 Mon Sep 17 00:00:00 2001 From: Farnooshmo <91014204+Farnooshmo@users.noreply.github.com> Date: Fri, 25 Nov 2022 21:07:14 +0000 Subject: [PATCH 04/11] Exercises/G-numbers completed! --- exercises/G-numbers/exercise.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/exercises/G-numbers/exercise.js b/exercises/G-numbers/exercise.js index 49e7bc00b..b535f101d 100644 --- a/exercises/G-numbers/exercise.js +++ b/exercises/G-numbers/exercise.js @@ -1 +1,14 @@ // Start by creating a variables `numberOfStudents` and `numberOfMentors` +var numberOfStudents = 15; +var numberOfMentors = 8; + +students = numberOfStudents; +mentors = numberOfMentors; + +var messageStudent = "Number of students: " + students; +var MessageMentors = "Number of mentors: " + mentors; +var totalInClass = students + mentors; +var messageTotal = "Total number of students and mentors: " + totalInClass; +console.log(messageStudent); +console.log(MessageMentors); +console.log(messageTotal); From 01ae4f206960c9618e08f0c9e420d525df8e19f9 Mon Sep 17 00:00:00 2001 From: Farnooshmo <91014204+Farnooshmo@users.noreply.github.com> Date: Fri, 25 Nov 2022 22:20:53 +0000 Subject: [PATCH 05/11] Exercise/I-floats completed! --- exercises/I-floats/exercise.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/exercises/I-floats/exercise.js b/exercises/I-floats/exercise.js index a5bbcd852..7f4b1589a 100644 --- a/exercises/I-floats/exercise.js +++ b/exercises/I-floats/exercise.js @@ -1,2 +1,15 @@ var numberOfStudents = 15; var numberOfMentors = 8; +students = numberOfStudents; +mentors = numberOfMentors; + +var totalInClass = students + mentors; +let percentageOfStudent = (students / totalInClass) * 100; +let percentageOfStudentRound = Math.round(percentageOfStudent); + +console.log("Percentage students: " + percentageOfStudentRound); + +let percentageOfMentorsRound = Math.round((mentors / totalInClass) * 100); +let messagePercentageOfMentors = + "Percentage Mentors: " + percentageOfMentorsRound; +console.log(messagePercentageOfMentors); From 80b7d1cda51f84532d672c46ac4236c6f5172c4b Mon Sep 17 00:00:00 2001 From: Farnooshmo <91014204+Farnooshmo@users.noreply.github.com> Date: Fri, 25 Nov 2022 22:36:10 +0000 Subject: [PATCH 06/11] Exercises/J-function completed! --- exercises/J-functions/exercise.js | 3 ++- exercises/J-functions/exercise2.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/exercises/J-functions/exercise.js b/exercises/J-functions/exercise.js index 0ae5850e5..ebce7a059 100644 --- a/exercises/J-functions/exercise.js +++ b/exercises/J-functions/exercise.js @@ -1,7 +1,8 @@ function halve(number) { - // complete the function here + return number / 2; } var result = halve(12); console.log(result); +console.log(halve(82)); diff --git a/exercises/J-functions/exercise2.js b/exercises/J-functions/exercise2.js index 82ef5e780..95ef62512 100644 --- a/exercises/J-functions/exercise2.js +++ b/exercises/J-functions/exercise2.js @@ -1,5 +1,5 @@ function triple(number) { - // complete function here + return number * 3; } var result = triple(12); From 94902df99fb21adfdd2c51fdf4b2d54857ed27bb Mon Sep 17 00:00:00 2001 From: Farnooshmo <91014204+Farnooshmo@users.noreply.github.com> Date: Fri, 25 Nov 2022 23:13:15 +0000 Subject: [PATCH 07/11] Exercises/K-function completed! --- exercises/K-functions-parameters/exercise.js | 4 ++-- exercises/K-functions-parameters/exercise2.js | 4 +++- exercises/K-functions-parameters/exercise3.js | 6 ++++-- exercises/K-functions-parameters/exercise4.js | 6 ++++-- exercises/K-functions-parameters/exercise5.js | 4 +++- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/exercises/K-functions-parameters/exercise.js b/exercises/K-functions-parameters/exercise.js index 8d5db5e69..c15480416 100644 --- a/exercises/K-functions-parameters/exercise.js +++ b/exercises/K-functions-parameters/exercise.js @@ -1,6 +1,6 @@ // Complete the function so that it takes input parameters -function multiply() { - // Calculate the result of the function and return it +function multiply(a, b) { + return a * b; } // Assign the result of calling the function the variable `result` diff --git a/exercises/K-functions-parameters/exercise2.js b/exercises/K-functions-parameters/exercise2.js index db7a8904b..4461cb1af 100644 --- a/exercises/K-functions-parameters/exercise2.js +++ b/exercises/K-functions-parameters/exercise2.js @@ -1,4 +1,6 @@ -// Declare your function first +function divide(a, b) { + return a / b; +} var result = divide(3, 4); diff --git a/exercises/K-functions-parameters/exercise3.js b/exercises/K-functions-parameters/exercise3.js index 537e9f4ec..701fce829 100644 --- a/exercises/K-functions-parameters/exercise3.js +++ b/exercises/K-functions-parameters/exercise3.js @@ -1,5 +1,7 @@ -// Write your function here - +function createGreeting(name) { + return greet + name; +} +var greet = "Hello, my name is "; var greeting = createGreeting("Daniel"); console.log(greeting); diff --git a/exercises/K-functions-parameters/exercise4.js b/exercises/K-functions-parameters/exercise4.js index 7ab44589e..55ced89c4 100644 --- a/exercises/K-functions-parameters/exercise4.js +++ b/exercises/K-functions-parameters/exercise4.js @@ -1,5 +1,7 @@ -// Declare your function first +function add(a, b) { + return a + b; +} // Call the function and assign to a variable `sum` - +var sum = add(13, 124); console.log(sum); diff --git a/exercises/K-functions-parameters/exercise5.js b/exercises/K-functions-parameters/exercise5.js index 7c5bcd605..d4d533628 100644 --- a/exercises/K-functions-parameters/exercise5.js +++ b/exercises/K-functions-parameters/exercise5.js @@ -1,4 +1,6 @@ -// Declare your function here +function createLongGreeting(name, age) { + return "Hello, my name is " + name + " and I'm " + age + "years old"; +} const greeting = createLongGreeting("Daniel", 30); From 26b29daba6e587027e866eb0193149008e35d4bc Mon Sep 17 00:00:00 2001 From: Farnooshmo <91014204+Farnooshmo@users.noreply.github.com> Date: Fri, 25 Nov 2022 23:31:29 +0000 Subject: [PATCH 08/11] Exercises/L-function completed! --- exercises/L-functions-nested/exercise.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/exercises/L-functions-nested/exercise.js b/exercises/L-functions-nested/exercise.js index a5d377442..42b68e7db 100644 --- a/exercises/L-functions-nested/exercise.js +++ b/exercises/L-functions-nested/exercise.js @@ -3,3 +3,16 @@ var mentor2 = "Irina"; var mentor3 = "Mimi"; var mentor4 = "Rob"; var mentor5 = "Yohannes"; + +function namesUpperCase(names) { + return names.toUpperCase(); +} + +function greetingMentors(names) { + return `HELLO ${namesUpperCase(names)}`; +} +console.log(greetingMentors(mentor1)); +console.log(greetingMentors(mentor2)); +console.log(greetingMentors(mentor3)); +console.log(greetingMentors(mentor4)); +console.log(greetingMentors(mentor5)); From 52eb5ccc5bbd7d995a37965564aae85daf0cf24c Mon Sep 17 00:00:00 2001 From: Farnooshmo <91014204+Farnooshmo@users.noreply.github.com> Date: Thu, 1 Dec 2022 07:59:01 +0000 Subject: [PATCH 09/11] Changes after code review --- exercises/F-strings-methods/exercise.js | 6 +++--- exercises/F-strings-methods/exercise2.js | 11 ++++++----- exercises/K-functions-parameters/exercise.js | 2 +- exercises/K-functions-parameters/exercise2.js | 2 +- exercises/K-functions-parameters/exercise3.js | 6 ++++-- mandatory/1-syntax-errors.js | 2 +- mandatory/4-tax.js | 9 ++++++++- 7 files changed, 24 insertions(+), 14 deletions(-) diff --git a/exercises/F-strings-methods/exercise.js b/exercises/F-strings-methods/exercise.js index b1bcaf0cc..d17c61b24 100644 --- a/exercises/F-strings-methods/exercise.js +++ b/exercises/F-strings-methods/exercise.js @@ -1,6 +1,6 @@ -// Start by creating a variable `message` -var message = "Read the instruction!"; -var messageType = typeof message; + +const message = "Read the instruction!"; +let messageType = typeof message; console.log(message); console.log(messageType); console.log("This is a " + messageType); diff --git a/exercises/F-strings-methods/exercise2.js b/exercises/F-strings-methods/exercise2.js index c9959ef6f..dfa59c4cc 100644 --- a/exercises/F-strings-methods/exercise2.js +++ b/exercises/F-strings-methods/exercise2.js @@ -1,7 +1,8 @@ -var message = "Hello, This is Farnoosh!"; -var myName = "Farnoosh"; -var myNameTrim = myName.trim(); -var myNameLenght = myName.length; +const message = "Hello, This is Farnoosh!"; +const myName = "Farnoosh"; +let myNameTrim = myName.trim(); +let myNameLenght = myName.length; -var messageTwo = message + " My name is " + myNameLenght + " characters long!"; +let messageTwo = message + " My name is " + myNameLenght + " characters long!"; console.log(messageTwo); +console.log(myNameLenght); diff --git a/exercises/K-functions-parameters/exercise.js b/exercises/K-functions-parameters/exercise.js index c15480416..5a72d5e8d 100644 --- a/exercises/K-functions-parameters/exercise.js +++ b/exercises/K-functions-parameters/exercise.js @@ -4,6 +4,6 @@ function multiply(a, b) { } // Assign the result of calling the function the variable `result` -var result = multiply(3, 4); +let result = multiply(3, 4); console.log(result); diff --git a/exercises/K-functions-parameters/exercise2.js b/exercises/K-functions-parameters/exercise2.js index 4461cb1af..702c17d06 100644 --- a/exercises/K-functions-parameters/exercise2.js +++ b/exercises/K-functions-parameters/exercise2.js @@ -2,6 +2,6 @@ function divide(a, b) { return a / b; } -var result = divide(3, 4); +let result = divide(3, 4); console.log(result); diff --git a/exercises/K-functions-parameters/exercise3.js b/exercises/K-functions-parameters/exercise3.js index 701fce829..77fbe4adb 100644 --- a/exercises/K-functions-parameters/exercise3.js +++ b/exercises/K-functions-parameters/exercise3.js @@ -1,7 +1,9 @@ function createGreeting(name) { + const greet = "Hello, my name is "; + return greet + name; + } -var greet = "Hello, my name is "; -var greeting = createGreeting("Daniel"); + let greeting = createGreeting("Daniel"); console.log(greeting); diff --git a/mandatory/1-syntax-errors.js b/mandatory/1-syntax-errors.js index 730b464ac..02100c737 100644 --- a/mandatory/1-syntax-errors.js +++ b/mandatory/1-syntax-errors.js @@ -8,7 +8,7 @@ function introduceMe(name, age) { return "Hello, my name is " + name + " and I am " + age + " years old"; } function getTotal(a, b) { - total = a + b; + const total = a + b; return "The total is " + total; } diff --git a/mandatory/4-tax.js b/mandatory/4-tax.js index f1e3f9fa6..424622c72 100644 --- a/mandatory/4-tax.js +++ b/mandatory/4-tax.js @@ -21,8 +21,11 @@ function calculateSalesTax(priceOfProduct) { */ function addTaxAndFormatCurrency(priceOfProduct) { - return "£".concat(calculateSalesTax(priceOfProduct).toFixed(2)); + const newLocal = calculateSalesTax(priceOfProduct).toFixed(2); + let vat = newLocal; + return `£${vat}`; } +console.log(addTaxAndFormatCurrency(17.5)); /* =================================================== @@ -58,3 +61,7 @@ test("addTaxAndFormatCurrency for £17.50", () => { test("addTaxAndFormatCurrency for £34", () => { expect(addTaxAndFormatCurrency(34)).toEqual("£40.80"); }); +function newFunction() { + console.log(addTaxAndFormatCurrency(15)); +} + From 51e44edfcc00437b0a2d3f337dfe6df3f06aeff4 Mon Sep 17 00:00:00 2001 From: Farnooshmo <91014204+Farnooshmo@users.noreply.github.com> Date: Tue, 27 Dec 2022 23:39:11 +0000 Subject: [PATCH 10/11] extra 1 completed --- extra/1-currency-conversion.js | 12 ++++++++++-- extra/2-piping.js | 12 ++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/extra/1-currency-conversion.js b/extra/1-currency-conversion.js index 75b3c6aab..9045f805e 100644 --- a/extra/1-currency-conversion.js +++ b/extra/1-currency-conversion.js @@ -5,7 +5,10 @@ Write a function that converts a price to USD (exchange rate is 1.4 $ to £) */ -function convertToUSD() {} +function convertToUSD(price) { + let priceInUSD = price * 1.4; + return "$" + priceInUSD; +} /* CURRENCY CONVERSION @@ -15,7 +18,12 @@ function convertToUSD() {} They have also decided that they should add a 1% fee to all foreign transactions, which means you only convert 99% of the £ to BRL. */ -function convertToBRL() {} +function convertToBRL(pound) { + let convertRate = 0.99 * 5.7 ; + let convertReal = pound * convertRate; + convertReal = convertReal.toFixed(2); + return convertReal; +} /* ======= TESTS - DO NOT MODIFY ===== There are some Tests in this file that will help you work out if your code is working. diff --git a/extra/2-piping.js b/extra/2-piping.js index b4f8c4c1b..ea58ad522 100644 --- a/extra/2-piping.js +++ b/extra/2-piping.js @@ -16,17 +16,21 @@ the final result to the variable goodCode */ -function add() { +function add(a, b) { + return a + b; +} +function multiply(a, b) { +return a * b; } -function multiply() { +function format(price) { +return "£" + price; } -function format() { -} + const startingValue = 2; From 79ad4127e71ae4a6bfabd981abd5dfb67d9aa170 Mon Sep 17 00:00:00 2001 From: Farnooshmo <91014204+Farnooshmo@users.noreply.github.com> Date: Sat, 31 Dec 2022 17:01:33 +0000 Subject: [PATCH 11/11] Update 2-piping.js --- extra/2-piping.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/2-piping.js b/extra/2-piping.js index ea58ad522..56de8a721 100644 --- a/extra/2-piping.js +++ b/extra/2-piping.js @@ -35,7 +35,7 @@ return "£" + price; const startingValue = 2; // Why can this code be seen as bad practice? Comment your answer. -let badCode = +let badCode = /* BETTER PRACTICE */