From c6a44f116e48213d405c51759020f15465adbc77 Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Sun, 27 Sep 2026 12:48:15 +0100 Subject: [PATCH 01/21] first prediction --- Sprint-3/1-key-errors/0.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sprint-3/1-key-errors/0.js b/Sprint-3/1-key-errors/0.js index 653d6f5a0..2a928de78 100644 --- a/Sprint-3/1-key-errors/0.js +++ b/Sprint-3/1-key-errors/0.js @@ -1,5 +1,5 @@ // Predict and explain first... -// =============> write your prediction here +// =============> write your prediction here :there is a syntax error because string is decleared two tiimes. // call the function capitalise with a string input // interpret the error message and figure out why an error is occurring @@ -8,6 +8,8 @@ function capitalise(str) { let str = `${str[0].toUpperCase()}${str.slice(1)}`; return str; } +capitalise("Ramesh"); +console.log() // =============> write your explanation here // =============> write your new code here From 161d04436a1fdb823cda250b31f3c39a98d926d9 Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Sun, 27 Sep 2026 13:13:27 +0100 Subject: [PATCH 02/21] o.js has been fixed and output is Ramesh --- Sprint-3/1-key-errors/0.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Sprint-3/1-key-errors/0.js b/Sprint-3/1-key-errors/0.js index 2a928de78..4515b71c7 100644 --- a/Sprint-3/1-key-errors/0.js +++ b/Sprint-3/1-key-errors/0.js @@ -3,13 +3,23 @@ // call the function capitalise with a string input // interpret the error message and figure out why an error is occurring +//while calling a function capitalise occured a error. The error is occured due to declared of Str two times. + +// /*function capitalise(str) { +// let str = `${str[0].toUpperCase()}${str.slice(1)}`; +// return str; +// } +// capitalise("Ramesh");*/ -function capitalise(str) { - let str = `${str[0].toUpperCase()}${str.slice(1)}`; - return str; -} -capitalise("Ramesh"); -console.log() // =============> write your explanation here +// to resolve this error we need to declared a new variable in step 9. after declaring a new variable it runs and give outputs. +//which first letter is capital and other are remain same. // =============> write your new code here +function capitalise(str) { + let ab = `${str[0].toUpperCase()}${str.slice(1)}`; + return ab; +} +capitalise("ramesh"); +// The correct code is given above i pass a value ramesh after running this function the output become Ramesh. + From e09336a16ad1c29348c50e3ab24c91acd31b8c73 Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Sun, 27 Sep 2026 13:28:57 +0100 Subject: [PATCH 03/21] predict to write return in line 6 --- Sprint-3/2-mandatory-debug/0.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/2-mandatory-debug/0.js b/Sprint-3/2-mandatory-debug/0.js index b27511b41..1e7e89037 100644 --- a/Sprint-3/2-mandatory-debug/0.js +++ b/Sprint-3/2-mandatory-debug/0.js @@ -1,6 +1,6 @@ // Predict and explain first... -// =============> write your prediction here +// =============> write your prediction here : In step six we need to write return type and output become 320. function multiply(a, b) { console.log(a * b); From ffcaf92f8dc93f290ce968f4865969a7ed34651c Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Sun, 27 Sep 2026 13:35:16 +0100 Subject: [PATCH 04/21] Put return instead of console.log --- Sprint-3/2-mandatory-debug/0.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Sprint-3/2-mandatory-debug/0.js b/Sprint-3/2-mandatory-debug/0.js index 1e7e89037..f0efc31b1 100644 --- a/Sprint-3/2-mandatory-debug/0.js +++ b/Sprint-3/2-mandatory-debug/0.js @@ -2,13 +2,21 @@ // =============> write your prediction here : In step six we need to write return type and output become 320. -function multiply(a, b) { - console.log(a * b); -} +// function multiply(a, b) { +// console.log(a * b); +// } -console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`); +// // console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`); -// =============> write your explanation here +// =============> write your explanation +// There should be return but code is perfectly run without changing the return type instead of console.log in line 6. -// Finally, correct the code to fix the problem +// Finally, correct the code to fix the problem +// In the section there has no output error but console is for getting output in print but in function there should be a return type so that after correcting this code +// the output become The result of multiplying 10 and 32 is 320. // =============> write your new code here +function multiply(a, b) { + return a * b; +} + +console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`); \ No newline at end of file From 370f927cd134c1ae3cf6fce0e15a354f27f69df9 Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Sun, 27 Sep 2026 13:48:14 +0100 Subject: [PATCH 05/21] change and finally got the error fixed --- Sprint-3/2-mandatory-debug/1.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Sprint-3/2-mandatory-debug/1.js b/Sprint-3/2-mandatory-debug/1.js index 37cedfbcf..c055291bf 100644 --- a/Sprint-3/2-mandatory-debug/1.js +++ b/Sprint-3/2-mandatory-debug/1.js @@ -1,13 +1,20 @@ // Predict and explain first... // =============> write your prediction here +// As per this question the answer is not defined but answer should be 42. +// function sum(a, b) { +// return; +// a + b; +// } -function sum(a, b) { - return; - a + b; -} - -console.log(`The sum of 10 and 32 is ${sum(10, 32)}`); +// console.log(`The sum of 10 and 32 is ${sum(10, 32)}`); // =============> write your explanation here +//In this question return type has no value so we need to put a+b in step 5. The step 5 will be return a+b;. // Finally, correct the code to fix the problem // =============> write your new code here +function sum(a, b) { + return a + b; +} + +console.log(`The sum of 10 and 32 is ${sum(10, 32)}`); +// After correcting this code we get the exact output 42. Without correction the output is The sum of 10 and 32 is undefined. From 450b81e577ad79437258ff32376a82d9e874b839 Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Sun, 27 Sep 2026 14:12:18 +0100 Subject: [PATCH 06/21] Predict and put the num inside the get last digit function --- Sprint-3/2-mandatory-debug/2.js | 34 +++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/Sprint-3/2-mandatory-debug/2.js b/Sprint-3/2-mandatory-debug/2.js index 57d3f5dc3..5bf46a529 100644 --- a/Sprint-3/2-mandatory-debug/2.js +++ b/Sprint-3/2-mandatory-debug/2.js @@ -1,24 +1,42 @@ -// Predict and explain first... +// Predict and explain first +// As per the code output should be the last digits of the given number . // Predict the output of the following code: // =============> Write your prediction here +// +// The output always be 3 3 3 3 3 3 3 but i thought output should be the last digits. -const num = 103; +// const num = 103; -function getLastDigit() { - return num.toString().slice(-1); -} +// function getLastDigit() { +// return num.toString().slice(-1); +// } -console.log(`The last digit of 42 is ${getLastDigit(42)}`); -console.log(`The last digit of 105 is ${getLastDigit(105)}`); -console.log(`The last digit of 806 is ${getLastDigit(806)}`); +// console.log(`The last digit of 42 is ${getLastDigit(42)}`); +// console.log(`The last digit of 105 is ${getLastDigit(105)}`); +// console.log(`The last digit of 806 is ${getLastDigit(806)}`); // Now run the code and compare the output to your prediction // =============> write the output here +// The last digit of 42 is 3 +// The last digit of 105 is 3 +// The last digit of 806 is 3 // Explain why the output is the way it is // =============> write your explanation here +// In this variable num is constant and there is no any declaration in function name. Due to this reasons result always be 3. // Finally, correct the code to fix the problem // =============> write your new code here +const num = 103; + +function getLastDigit(num) { + return num.toString().slice(-1); +} + +console.log(`The last digit of 42 is ${getLastDigit(42)}`); +console.log(`The last digit of 105 is ${getLastDigit(105)}`); +console.log(`The last digit of 806 is ${getLastDigit(806)}`); + // This program should tell the user the last digit of each number. // Explain why getLastDigit is not working properly - correct the problem +// To solve this problems we need to write variable in function. From 2cb25398bbe9215e639261af0107a2a0da8be4f5 Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Sun, 27 Sep 2026 19:39:15 +0100 Subject: [PATCH 07/21] Delete and cons and put convertToPercentage function back in the code --- Sprint-3/1-key-errors/1.js | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/Sprint-3/1-key-errors/1.js b/Sprint-3/1-key-errors/1.js index f2d56151f..b516280ee 100644 --- a/Sprint-3/1-key-errors/1.js +++ b/Sprint-3/1-key-errors/1.js @@ -1,20 +1,30 @@ // Predict and explain first... // Why will an error occur when this program runs? -// =============> write your prediction here +// =============> I think when we run the programme it will show the type error because decimal number is reassigning inside the function. // Try playing computer with the example to work out what is going on -function convertToPercentage(decimalNumber) { - const decimalNumber = 0.5; - const percentage = `${decimalNumber * 100}%`; +// function convertToPercentage(decimalNumber) { +// const decimalNumber = 0.5; +// const percentage = `${decimalNumber * 100}%`; - return percentage; -} +// return percentage; +// } -console.log(decimalNumber); +// console.log(decimalNumber); // =============> write your explanation here - +// while running this function is shows typeerror because decimal number variable is declared two times. +// and in step 15 we need call function name not decimal number. // Finally, correct the code to fix the problem // =============> write your new code here +function convertToPercentage(decimalNumber) { + + const percentage = `${decimalNumber * 100}%`; + + return percentage; +} + +console.log(convertToPercentage(0.5)); +// After solving this the output is 50%. From 36a82567f0ea749ae9584dfba35f4247e34d4c37 Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Sun, 27 Sep 2026 19:49:42 +0100 Subject: [PATCH 08/21] change the function assigning the variable num . --- Sprint-3/1-key-errors/2.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Sprint-3/1-key-errors/2.js b/Sprint-3/1-key-errors/2.js index aad57f7cf..825c45061 100644 --- a/Sprint-3/1-key-errors/2.js +++ b/Sprint-3/1-key-errors/2.js @@ -1,20 +1,30 @@ // Predict and explain first BEFORE you run any code... +// It show the reference error cause function not assigned the variable so that, code is stuck. // this function should square any number but instead we're going to get an error // =============> write your prediction of the error here -function square(3) { - return num * num; -} +// function square(3) { +// return num * num; +// } // =============> write the error message here +// the message is SyntaxError: Unexpected number. // =============> explain this error message here +// The error message is occured due to not assigning the variable in function. TO solve this problems we need to assign the num variable in function. // Finally, correct the code to fix the problem // =============> write your new code here +function square(num) { + return num * num; +} + +console.log(square(3)); +// The output of this programme is 9. + From ccccc5a6315b12fabc1d45d7ef08ee4911d2d157 Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Sun, 27 Sep 2026 20:18:28 +0100 Subject: [PATCH 09/21] In this , i make the height squared and then divide the weight by the height squared to get the BMI. I also used the toFixed method to round the BMI to one decimal place. --- Sprint-3/3-mandatory-implement/1-bmi.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sprint-3/3-mandatory-implement/1-bmi.js b/Sprint-3/3-mandatory-implement/1-bmi.js index 58b1085f1..cdecf63d6 100644 --- a/Sprint-3/3-mandatory-implement/1-bmi.js +++ b/Sprint-3/3-mandatory-implement/1-bmi.js @@ -16,4 +16,9 @@ function calculateBMI(weight, height) { // return the BMI of someone based off their weight and height + let squared_height = height * height; + const bmi = weight/squared_height; + return bmi.toFixed(1); } +console.log(`The BMi of the person is ${calculateBMI(70,2.99)}`); +// The output of the program is 'The BMi of the person is 7.8'. \ No newline at end of file From 7c0c3df1eb648bbdcb26fefa3bc23361f9ffb96b Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Sun, 27 Sep 2026 20:39:33 +0100 Subject: [PATCH 10/21] Lower case is changed into upper case and spaces are replaced with underscores. --- Sprint-3/3-mandatory-implement/2-cases.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sprint-3/3-mandatory-implement/2-cases.js b/Sprint-3/3-mandatory-implement/2-cases.js index 5b0ef77ad..65167bd47 100644 --- a/Sprint-3/3-mandatory-implement/2-cases.js +++ b/Sprint-3/3-mandatory-implement/2-cases.js @@ -14,3 +14,8 @@ // You will need to come up with an appropriate name for the function // Use the MDN string documentation to help you find a solution // This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase +function touppercase(str){ + return str.replaceAll(' ', '_').toUpperCase(); +} +console.log(touppercase('hello there')); +// The output of the given code is HELLO_THERE \ No newline at end of file From cac70ad96589266904af78ad5c89e1443e39c9aa Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Sun, 27 Sep 2026 20:56:53 +0100 Subject: [PATCH 11/21] make a function to convert pence to pounds --- Sprint-3/3-mandatory-implement/3-to-pounds.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Sprint-3/3-mandatory-implement/3-to-pounds.js b/Sprint-3/3-mandatory-implement/3-to-pounds.js index 10754da73..eedb87472 100644 --- a/Sprint-3/3-mandatory-implement/3-to-pounds.js +++ b/Sprint-3/3-mandatory-implement/3-to-pounds.js @@ -4,3 +4,20 @@ // You will need to declare a function called toPounds with an appropriately named parameter. // You should call this function a number of times to check it works for different inputs +function toPound(penceString) { + const penceStringWithoutTrailingP = penceString.substring( + 0, + penceString.length - 1, + ); + const paddedPenceNumberString = penceStringWithoutTrailingP.padStart(3, "0"); + const pounds = paddedPenceNumberString.substring( + 0, + paddedPenceNumberString.length - 2, + ); + const pence = paddedPenceNumberString + .substring(paddedPenceNumberString.length - 2) + .padEnd(2, "0"); + return `£${pounds}.${pence}`; +} +console.log(toPound("399p")); +console.log(toPound("2p")); From 9dcb6ac6a1d6077609b43f3cc54ad5a191502530 Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Sun, 27 Sep 2026 21:16:38 +0100 Subject: [PATCH 12/21] give a answer to the question in the file 4-mandatory-interpret/time-format.js --- Sprint-3/4-mandatory-interpret/time-format.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Sprint-3/4-mandatory-interpret/time-format.js b/Sprint-3/4-mandatory-interpret/time-format.js index c0dd9c9a5..1bd46e36c 100644 --- a/Sprint-3/4-mandatory-interpret/time-format.js +++ b/Sprint-3/4-mandatory-interpret/time-format.js @@ -14,6 +14,7 @@ function formatTimeDisplay(seconds) { return `${pad(totalHours)}:${pad(remainingMinutes)}:${pad(remainingSeconds)}`; } +console.log(formatTimeDisplay(61)) // You will need to play computer with this example - use the Python Visualiser https://pythontutor.com/visualize.html#mode=edit // to help you answer these questions @@ -22,17 +23,24 @@ function formatTimeDisplay(seconds) { // a) When formatTimeDisplay is called how many times will pad be called? // =============> write your answer here +// The pad is called 3 times in step 15. // Call formatTimeDisplay with an input of 61, now answer the following: // b) What is the value assigned to num when pad is called for the first time? // =============> write your answer here - +// The value which is assigned to num when pad is called for the first time is 0. // c) What is the return value of pad when it is called for the first time? // =============> write your answer here +// The value of pad when it is called for the first time "00" // d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer // =============> write your answer here +// The value assign to num is 1. +// because the last call to pad is pad(remainingSeconds), and remainingSeconds is 1 +// when formatTimeDisplay(61) is called. // e) What is the return value of pad when it is called for the last time in this program? Explain your answer // =============> write your answer here +// The return value is "01" because the last call to pad is pad(1). +// The pad function add a zero to make the number two digits. \ No newline at end of file From 9e097c259b17e6c5100fe64e3394859e99030503 Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Tue, 29 Sep 2026 22:41:23 +0100 Subject: [PATCH 13/21] update the height of the person 1.73 and update the comment 24 --- Sprint-3/3-mandatory-implement/1-bmi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sprint-3/3-mandatory-implement/1-bmi.js b/Sprint-3/3-mandatory-implement/1-bmi.js index cdecf63d6..f5fcf2653 100644 --- a/Sprint-3/3-mandatory-implement/1-bmi.js +++ b/Sprint-3/3-mandatory-implement/1-bmi.js @@ -20,5 +20,5 @@ function calculateBMI(weight, height) { const bmi = weight/squared_height; return bmi.toFixed(1); } -console.log(`The BMi of the person is ${calculateBMI(70,2.99)}`); -// The output of the program is 'The BMi of the person is 7.8'. \ No newline at end of file +console.log(`The BMi of the person is ${calculateBMI(70,1.73)}`); +// The output of the program is 'The BMi of the person is 23.4'. \ No newline at end of file From dff88a28731e8b4812872a2d0037a2c21796428d Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Tue, 29 Sep 2026 22:44:48 +0100 Subject: [PATCH 14/21] make atype error into syntex errorans soon. --- Sprint-3/1-key-errors/1.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/1-key-errors/1.js b/Sprint-3/1-key-errors/1.js index b516280ee..3630a2561 100644 --- a/Sprint-3/1-key-errors/1.js +++ b/Sprint-3/1-key-errors/1.js @@ -15,7 +15,7 @@ // console.log(decimalNumber); // =============> write your explanation here -// while running this function is shows typeerror because decimal number variable is declared two times. +// while running this function is shows SyntaxError because decimal number variable is declared two times which JavaScript does not allow. // and in step 15 we need call function name not decimal number. // Finally, correct the code to fix the problem // =============> write your new code here From 87ff7d933511b4cfbd59bfe6750066501c0c5c5e Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Tue, 29 Sep 2026 22:51:23 +0100 Subject: [PATCH 15/21] replace function name touppercase with toUpperSnakeCase --- Sprint-3/3-mandatory-implement/2-cases.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sprint-3/3-mandatory-implement/2-cases.js b/Sprint-3/3-mandatory-implement/2-cases.js index 65167bd47..a6727787f 100644 --- a/Sprint-3/3-mandatory-implement/2-cases.js +++ b/Sprint-3/3-mandatory-implement/2-cases.js @@ -14,8 +14,8 @@ // You will need to come up with an appropriate name for the function // Use the MDN string documentation to help you find a solution // This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase -function touppercase(str){ +function toUpperSnakeCase(str){ return str.replaceAll(' ', '_').toUpperCase(); } -console.log(touppercase('hello there')); +console.log(toUpperSnakeCase('hello there')); // The output of the given code is HELLO_THERE \ No newline at end of file From 6cdfd0362d9648f43ca0e2d06aa900d20772bcf3 Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Tue, 29 Sep 2026 22:54:55 +0100 Subject: [PATCH 16/21] i changed the function name topounds from topound and also changed the console log to reflect the new function name --- Sprint-3/3-mandatory-implement/3-to-pounds.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sprint-3/3-mandatory-implement/3-to-pounds.js b/Sprint-3/3-mandatory-implement/3-to-pounds.js index eedb87472..d9bc919a0 100644 --- a/Sprint-3/3-mandatory-implement/3-to-pounds.js +++ b/Sprint-3/3-mandatory-implement/3-to-pounds.js @@ -4,7 +4,7 @@ // You will need to declare a function called toPounds with an appropriately named parameter. // You should call this function a number of times to check it works for different inputs -function toPound(penceString) { +function toPounds(penceString) { const penceStringWithoutTrailingP = penceString.substring( 0, penceString.length - 1, @@ -19,5 +19,5 @@ function toPound(penceString) { .padEnd(2, "0"); return `£${pounds}.${pence}`; } -console.log(toPound("399p")); -console.log(toPound("2p")); +console.log(toPounds("399p")); +console.log(toPounds("2p")); From 992bd509ef5f4605d160ad352bfbb66bea1090dd Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Tue, 29 Sep 2026 22:57:08 +0100 Subject: [PATCH 17/21] i comment the line 29 not removed. --- Sprint-3/2-mandatory-debug/2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/2-mandatory-debug/2.js b/Sprint-3/2-mandatory-debug/2.js index 5bf46a529..ee7a37d6a 100644 --- a/Sprint-3/2-mandatory-debug/2.js +++ b/Sprint-3/2-mandatory-debug/2.js @@ -26,7 +26,7 @@ // In this variable num is constant and there is no any declaration in function name. Due to this reasons result always be 3. // Finally, correct the code to fix the problem // =============> write your new code here -const num = 103; +// const num = 103; function getLastDigit(num) { return num.toString().slice(-1); From 3a7d28766e3542c059bc1d3a621dcb58c2239b0b Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Wed, 30 Sep 2026 20:39:06 +0100 Subject: [PATCH 18/21] Removed the line 29 --- Sprint-3/2-mandatory-debug/2.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/Sprint-3/2-mandatory-debug/2.js b/Sprint-3/2-mandatory-debug/2.js index ee7a37d6a..ffb0ed3e5 100644 --- a/Sprint-3/2-mandatory-debug/2.js +++ b/Sprint-3/2-mandatory-debug/2.js @@ -26,8 +26,6 @@ // In this variable num is constant and there is no any declaration in function name. Due to this reasons result always be 3. // Finally, correct the code to fix the problem // =============> write your new code here -// const num = 103; - function getLastDigit(num) { return num.toString().slice(-1); } From c1bba8823a3d0bef9ebe4683c21eaa24ed0ea14d Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Wed, 30 Sep 2026 21:42:56 +0100 Subject: [PATCH 19/21] last commit by take out of --- Sprint-3/2-mandatory-debug/2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/2-mandatory-debug/2.js b/Sprint-3/2-mandatory-debug/2.js index ffb0ed3e5..4aa9eefcc 100644 --- a/Sprint-3/2-mandatory-debug/2.js +++ b/Sprint-3/2-mandatory-debug/2.js @@ -35,6 +35,6 @@ console.log(`The last digit of 105 is ${getLastDigit(105)}`); console.log(`The last digit of 806 is ${getLastDigit(806)}`); -// This program should tell the user the last digit of each number. +// This program should tell the user the last digit each number. // Explain why getLastDigit is not working properly - correct the problem // To solve this problems we need to write variable in function. From 0a4d5aaeacbdfae6a3beac8b6b4f7295856494c0 Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Thu, 1 Oct 2026 11:51:40 +0100 Subject: [PATCH 20/21] i changed the single quotes to double quotes in the toUpperSnakeCase function for consistency. As per the guide --- Sprint-3/3-mandatory-implement/2-cases.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/3-mandatory-implement/2-cases.js b/Sprint-3/3-mandatory-implement/2-cases.js index a6727787f..5d21b3b2c 100644 --- a/Sprint-3/3-mandatory-implement/2-cases.js +++ b/Sprint-3/3-mandatory-implement/2-cases.js @@ -15,7 +15,7 @@ // Use the MDN string documentation to help you find a solution // This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase function toUpperSnakeCase(str){ - return str.replaceAll(' ', '_').toUpperCase(); + return str.replaceAll(" ", "_").toUpperCase(); } console.log(toUpperSnakeCase('hello there')); // The output of the given code is HELLO_THERE \ No newline at end of file From c4e8a63ec1f59352633d7e88ce366fe16d65f082 Mon Sep 17 00:00:00 2001 From: gaireprakash20-ops Date: Thu, 1 Oct 2026 20:56:41 +0100 Subject: [PATCH 21/21] i formate the file --- Sprint-3/3-mandatory-implement/2-cases.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sprint-3/3-mandatory-implement/2-cases.js b/Sprint-3/3-mandatory-implement/2-cases.js index 5d21b3b2c..bc1cbe00c 100644 --- a/Sprint-3/3-mandatory-implement/2-cases.js +++ b/Sprint-3/3-mandatory-implement/2-cases.js @@ -14,8 +14,8 @@ // You will need to come up with an appropriate name for the function // Use the MDN string documentation to help you find a solution // This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase -function toUpperSnakeCase(str){ +function toUpperSnakeCase(str){ return str.replaceAll(" ", "_").toUpperCase(); } -console.log(toUpperSnakeCase('hello there')); +console.log(toUpperSnakeCase("hello there")); // The output of the given code is HELLO_THERE \ No newline at end of file