From 76d363edd9438b5a5cac7afa7ce5745baf050c77 Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Mon, 29 Sep 2025 18:17:19 +0100 Subject: [PATCH 01/18] Adding two comments describing line 3 --- Sprint-1/1-key-exercises/1-count.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sprint-1/1-key-exercises/1-count.js b/Sprint-1/1-key-exercises/1-count.js index 117bcb2b6..867f29b22 100644 --- a/Sprint-1/1-key-exercises/1-count.js +++ b/Sprint-1/1-key-exercises/1-count.js @@ -4,3 +4,6 @@ count = count + 1; // Line 1 is a variable declaration, creating the count variable with an initial value of 0 // Describe what line 3 is doing, in particular focus on what = is doing + +// Line 3 is updating the value of the count variable by incrementing its current value by 1. +// = sign is an assignment operator that transfers its value on the right (count + 1) to the variable on the left (count). From 616483028d86ffc876459fb04dfb72185af861e7 Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Mon, 29 Sep 2025 20:06:46 +0100 Subject: [PATCH 02/18] Initials variable has been declared and its value comes CKJ --- Sprint-1/1-key-exercises/2-initials.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Sprint-1/1-key-exercises/2-initials.js b/Sprint-1/1-key-exercises/2-initials.js index 47561f617..a99fb213b 100644 --- a/Sprint-1/1-key-exercises/2-initials.js +++ b/Sprint-1/1-key-exercises/2-initials.js @@ -5,7 +5,6 @@ let lastName = "Johnson"; // Declare a variable called initials that stores the first character of each string. // This should produce the string "CKJ", but you must not write the characters C, K, or J in the code of your solution. -let initials = ``; - -// https://www.google.com/search?q=get+first+character+of+string+mdn +let initials = firstName.charAt(0) + middleName.charAt(0) + lastName.charAt(0); +console.log(initials); From 8c6bab4478b56404305784738c4cba03caebc7bb Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Mon, 29 Sep 2025 20:50:07 +0100 Subject: [PATCH 03/18] Create two variable dir/ext to show part of the FilePath, Comments were added too --- Sprint-1/1-key-exercises/3-paths.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Sprint-1/1-key-exercises/3-paths.js b/Sprint-1/1-key-exercises/3-paths.js index ab90ebb28..e807bc05e 100644 --- a/Sprint-1/1-key-exercises/3-paths.js +++ b/Sprint-1/1-key-exercises/3-paths.js @@ -11,13 +11,14 @@ const filePath = "/Users/mitch/cyf/Module-JS1/week-1/interpret/file.txt"; const lastSlashIndex = filePath.lastIndexOf("/"); -const base = filePath.slice(lastSlashIndex + 1); -console.log(`The base part of ${filePath} is ${base}`); +const base = filePath.slice(lastSlashIndex + 1); // from filePath it will show file.txt +console.log(`The base part of ${filePath} is ${base}`); // it will print the base part of the filePath variable. // Create a variable to store the dir part of the filePath variable // Create a variable to store the ext part of the variable -const dir = ; -const ext = ; +const dir = filePath.slice(0, lastSlashIndex); // from FilePath it will show /Users/mitch/cyf/Module-JS1/week-1/interpret. +console.log(`The dir part of ${filePath} is ${dir}`); // it will print the dir part of the filePath variable. -// https://www.google.com/search?q=slice+mdn \ No newline at end of file +const ext = base.slice(base.lastIndexOf(".")); // from base it will show .txt +console.log(`The ext part of ${filePath} is ${ext}`); // it will print the ext part of the filePath variable. From c8bf5bdec6c3647333b1acac773c99cee1b5769b Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Mon, 29 Sep 2025 22:05:00 +0100 Subject: [PATCH 04/18] Adding comments to(Explain num,Breakdown the expression) + adding code line to print the result --- Sprint-1/1-key-exercises/4-random.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Sprint-1/1-key-exercises/4-random.js b/Sprint-1/1-key-exercises/4-random.js index 292f83aab..53b38e4f1 100644 --- a/Sprint-1/1-key-exercises/4-random.js +++ b/Sprint-1/1-key-exercises/4-random.js @@ -7,3 +7,18 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum; // Try breaking down the expression and using documentation to explain what it means // It will help to think about the order in which expressions are evaluated // Try logging the value of num and running the program several times to build an idea of what the program is doing +console.log(num); + +// num is a random integer between 1 and 100. +/* + Breaking down what happens in the expression: + + - Math.random() generates a random floating-point number between 0 and 1. + + -Multiplying this by (maximum - minimum + 1) scales it to a range of 0 to 100. + + -Math.floor() rounds down the result to the nearest integer number. + + -Finally, adding minimum shifts the range to be between 1 and 100. + + */ From 8e7295cd984a344bc08f13c20fed7d43c1d38c76 Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Mon, 29 Sep 2025 22:12:04 +0100 Subject: [PATCH 05/18] Convert the two lines to a comment --- Sprint-1/2-mandatory-errors/0.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sprint-1/2-mandatory-errors/0.js b/Sprint-1/2-mandatory-errors/0.js index cf6c5039f..997eae365 100644 --- a/Sprint-1/2-mandatory-errors/0.js +++ b/Sprint-1/2-mandatory-errors/0.js @@ -1,2 +1,3 @@ -This is just an instruction for the first activity - but it is just for human consumption -We don't want the computer to run these 2 lines - how can we solve this problem? \ No newline at end of file +/* This is just an instruction for the first activity - but it is just for human consumption +We don't want the computer to run these 2 lines - how can we solve this problem? +*/ From 636a0d3923c692ccda900268e65fb2bc57c3a49f Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Mon, 29 Sep 2025 22:28:30 +0100 Subject: [PATCH 06/18] Replace const with let, fix line 4, add code line+comments --- Sprint-1/2-mandatory-errors/1.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sprint-1/2-mandatory-errors/1.js b/Sprint-1/2-mandatory-errors/1.js index 7a43cbea7..0d4b2fdcb 100644 --- a/Sprint-1/2-mandatory-errors/1.js +++ b/Sprint-1/2-mandatory-errors/1.js @@ -1,4 +1,5 @@ // trying to create an age variable and then reassign the value by 1 -const age = 33; -age = age + 1; +let age = 30; // Change const to let to allow reassignment +age += 1; // Increment age by 1 +console.log(age); From 1e77924d93bc5cf8b082ea4abae7a7c3c71d4f3b Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Mon, 29 Sep 2025 22:44:26 +0100 Subject: [PATCH 07/18] Find the error --- Sprint-1/2-mandatory-errors/2.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Sprint-1/2-mandatory-errors/2.js b/Sprint-1/2-mandatory-errors/2.js index e09b89831..bef8a79e5 100644 --- a/Sprint-1/2-mandatory-errors/2.js +++ b/Sprint-1/2-mandatory-errors/2.js @@ -3,3 +3,12 @@ console.log(`I was born in ${cityOfBirth}`); const cityOfBirth = "Bolton"; + +/* The error: + The variable cityOfBirth should be declared before it is used in the console.log statement. + */ + +/* The correct code: +const cityOfBirth = "Bolton"; +console.log(`I was born in ${cityOfBirth}`); +*/ From b7575941027762d5edf803620c877c8de1e00265 Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Mon, 29 Sep 2025 23:09:32 +0100 Subject: [PATCH 08/18] Predict , Consider , Fix, Update --- Sprint-1/2-mandatory-errors/3.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Sprint-1/2-mandatory-errors/3.js b/Sprint-1/2-mandatory-errors/3.js index ec101884d..dcd6fc5cc 100644 --- a/Sprint-1/2-mandatory-errors/3.js +++ b/Sprint-1/2-mandatory-errors/3.js @@ -1,5 +1,7 @@ +/* The old code: const cardNumber = 4533787178994213; const last4Digits = cardNumber.slice(-4); +*/ // The last4Digits variable should store the last 4 digits of cardNumber // However, the code isn't working @@ -7,3 +9,16 @@ const last4Digits = cardNumber.slice(-4); // Then run the code and see what error it gives. // Consider: Why does it give this error? Is this what I predicted? If not, what's different? // Then try updating the expression last4Digits is assigned to, in order to get the correct value + +/* My prediction: The code will give an error because the minus sign(-4) and slice works only with strings, not numbers. + +Consideration: The error is a TypeError: cardNumber.slice is not a function. mostly it was because I predicted that numbers do not have a slice method. About the minus sign, I have learned about positive and negative indexing in strings, now I can see the difference. + + +To fix this, we need to convert cardNumber to a string before calling the slice method. +*/ + +// Updated code: +const cardNumber = 4533787178994213; +const last4DigitsCorrected = cardNumber.toString().slice(-4); +console.log(last4DigitsCorrected); From 6304885556b4390c9b0b5d6ed405528b029019b0 Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Mon, 29 Sep 2025 23:19:09 +0100 Subject: [PATCH 09/18] Fix the code --- Sprint-1/2-mandatory-errors/4.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Sprint-1/2-mandatory-errors/4.js b/Sprint-1/2-mandatory-errors/4.js index 21dad8c5d..9294537b5 100644 --- a/Sprint-1/2-mandatory-errors/4.js +++ b/Sprint-1/2-mandatory-errors/4.js @@ -1,2 +1,13 @@ +/* + The old code: const 12HourClockTime = "20:53"; -const 24hourClockTime = "08:53"; \ No newline at end of file +const 24hourClockTime = "08:53"; +console.log(24hourClockTime);*/ + +// It is giving a syntax error +// The reason is that variable names cannot start with a number + +// Updated code: +const hourClockTime12 = "20:53"; +const hourClockTime24 = "08:53"; +console.log(hourClockTime24, hourClockTime12); From dd1938fb17f6490087ee2604f42435e9342f43e4 Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Mon, 29 Sep 2025 23:58:10 +0100 Subject: [PATCH 10/18] Reading the code and answering the questions --- .../1-percentage-change.js | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Sprint-1/3-mandatory-interpret/1-percentage-change.js b/Sprint-1/3-mandatory-interpret/1-percentage-change.js index e24ecb8e1..6401edd42 100644 --- a/Sprint-1/3-mandatory-interpret/1-percentage-change.js +++ b/Sprint-1/3-mandatory-interpret/1-percentage-change.js @@ -13,10 +13,46 @@ console.log(`The percentage change is ${percentageChange}`); // a) How many function calls are there in this file? Write down all the lines where a function call is made +// There are 5 function calls in this file: +// line 4: carPrice.replaceAll(",", "") +// line 4: Number(carPrice.replaceAll(",", "")) +//line 5: priceAfterOneYear.replaceAll("," "") +// line 5: Number(priceAfterOneYear.replaceAll("," "")) +// line 9: console.log(`The percentage change is ${percentageChange}`) + + + // b) Run the code and identify the line where the error is coming from - why is this error occurring? How can you fix this problem? +/* + It's a SyntaxError in line 5: priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," ""));. + The error is occurring because there is a missing comma between the two arguments of the replaceAll function here ("," ""). + To fix this problem, we need to add a comma between the two arguments: replaceAll(",", ""). + */ + + // c) Identify all the lines that are variable reassignment statements +/*reusing the same variable carPrice but updating its value: +carPrice = Number(carPrice.replaceAll(",", "")); + +reusing the same variable priceAfterOneYear but updating its value: +priceAfterOneYear = Number(priceAfterOneYear.replaceAll(",", "")); +*/ + + // d) Identify all the lines that are variable declarations +/*declaring a new variable carPrice: +let carPrice = "10,000"; + +declaring a new variable priceAfterOneYear: +let priceAfterOneYear = "8,543"; +*/ + + // e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression? +/* +The expression Number(carPrice.replaceAll(",", "")) is converting the carPrice string into a number. +The purpose of this expression is to get a numeric value for carPrice that can be used for calculations. +*/ From 4d88daa7375916b165895a4716c1ad48cf932e9b Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Tue, 30 Sep 2025 12:43:19 +0100 Subject: [PATCH 11/18] Adding comments to answer the questions and testing the code --- .../3-mandatory-interpret/2-time-format.js | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Sprint-1/3-mandatory-interpret/2-time-format.js b/Sprint-1/3-mandatory-interpret/2-time-format.js index 47d239558..e0acadc70 100644 --- a/Sprint-1/3-mandatory-interpret/2-time-format.js +++ b/Sprint-1/3-mandatory-interpret/2-time-format.js @@ -12,14 +12,52 @@ console.log(result); // For the piece of code above, read the code and then answer the following questions // a) How many variable declarations are there in this program? +/* There are 6 variable declarations: +1.Line 1 : const movieLength. +2.Line 3 : const remainingSeconds. +3.Line 4 : const totalMinutes. +4.Line 6 : const remainingMinutes. +5.Line 7 : const totalHours. +6.Line 8 : const result. +*/ // b) How many function calls are there? +/* There is one function call: +Line 10 : console.log(). +*/ + // c) Using documentation, explain what the expression movieLength % 60 represents + +/* The movieLength shows the length of the movie in seconds, the operand % is remaining (Modulo) returns the remaining of the movieLength divided by 60(to convert sec into minutes) but it only gives the remaining of this operation. + */ + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators // d) Interpret line 4, what does the expression assigned to totalMinutes mean? +/* +The expression gives the completed total minutes of the movie, by subtract the movie length in sec from the remaining seconds and divide the result by 60 to convert it to minutes +*/ + // e) What do you think the variable result represents? Can you think of a better name for this variable? +/* + The variable result shows(display) the total length of the movie in three sections (Hours:Minutes:seconds) in string format. + + I can think of "MovieDuration" as a better name because it gives more description to the output. +*/ + // f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer + +/* +I did experimenting the code by putting different value to the movieLength and it works just fine. + +test numbers and its outcomes: +1. 8689693484 sec >> 2413803:44:44 +2. 12 sec >> 0:0:12 +3. 0 sec >> 0:0:0 +4. -700 sec >> 0:-11:-40 + +As the results show the code is working fine even with unexpected negative numbers or large numbers. +*/ From 69b5489532fe28acfe86af2a23534006ec4d9481 Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Tue, 30 Sep 2025 13:06:06 +0100 Subject: [PATCH 12/18] fix line 21 --- Sprint-1/3-mandatory-interpret/2-time-format.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-1/3-mandatory-interpret/2-time-format.js b/Sprint-1/3-mandatory-interpret/2-time-format.js index e0acadc70..99a2db56e 100644 --- a/Sprint-1/3-mandatory-interpret/2-time-format.js +++ b/Sprint-1/3-mandatory-interpret/2-time-format.js @@ -18,7 +18,7 @@ console.log(result); 3.Line 4 : const totalMinutes. 4.Line 6 : const remainingMinutes. 5.Line 7 : const totalHours. -6.Line 8 : const result. +6.Line 9 : const result. */ // b) How many function calls are there? From 7fdaec0919dac2f764cc90e6c30123373139ea50 Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Tue, 30 Sep 2025 13:47:50 +0100 Subject: [PATCH 13/18] Breakdwon the code --- Sprint-1/3-mandatory-interpret/3-to-pounds.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Sprint-1/3-mandatory-interpret/3-to-pounds.js b/Sprint-1/3-mandatory-interpret/3-to-pounds.js index 60c9ace69..cbe6136d6 100644 --- a/Sprint-1/3-mandatory-interpret/3-to-pounds.js +++ b/Sprint-1/3-mandatory-interpret/3-to-pounds.js @@ -4,6 +4,7 @@ const penceStringWithoutTrailingP = penceString.substring( 0, penceString.length - 1 ); +// const paddedPenceNumberString = penceStringWithoutTrailingP.padStart(3, "0"); const pounds = paddedPenceNumberString.substring( @@ -24,4 +25,14 @@ console.log(`£${pounds}.${pence}`); // Try and describe the purpose / rationale behind each step // To begin, we can start with -// 1. const penceString = "399p": initialises a string variable with the value "399p" +// 1. const penceString = "399p": initialises a string variable with the value "399p". + +// 2. const penceStringWithoutTrailingP = penceString.substring(0,penceString.length - 1): represent to takes a substring from index 0 up to (but not including) penceString.length - 1. + +// 3. const paddedPenceNumberString = penceStringWithoutTrailingP.padStart(3, "0"): assign to ensures the numeric string is at least 3 characters long by adding leading zeros if needed. + +// 4. const pounds = paddedPenceNumberString.substring( 0,paddedPenceNumberString.length - 2): Takes the substring from the start up to (but not including) the last two characters. + +// 5. substring(length - 2) : use to returns the last two characters (the pence digits). padEnd(2, "0") would append trailing zeros if the result were shorter than 2. + +// 6. console.log(`£${pounds}.${pence}`): assign to display the price in a human-readable pounds-and-pence format (£x.yy) From 6673a2a50d77b0444ab125bdee48689b57e2433c Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Tue, 30 Sep 2025 14:17:44 +0100 Subject: [PATCH 14/18] Test 'alert' and 'prompt' functions in Google Chrome console --- Sprint-1/4-stretch-explore/chrome.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sprint-1/4-stretch-explore/chrome.md b/Sprint-1/4-stretch-explore/chrome.md index e7dd5feaf..52333cc5c 100644 --- a/Sprint-1/4-stretch-explore/chrome.md +++ b/Sprint-1/4-stretch-explore/chrome.md @@ -12,7 +12,12 @@ invoke the function `alert` with an input string of `"Hello world!"`; What effect does calling the `alert` function have? +Answer: A pop up window displaying a text (Hello World!) will appear on the top and an OK button. It's a temporarily effect, but it required a user interaction to press OK before continuing. + Now try invoking the function `prompt` with a string input of `"What is your name?"` - store the return value of your call to `prompt` in an variable called `myName`. What effect does calling the `prompt` function have? What is the return value of `prompt`? + +Answer: A pop up window appears with a title and a question (What is your name?), also an answering space area. At the right down of the window there are two buttons to the user, Ok and cancel. +After typing myName and press OK the console display the answer(myName). From 21a7389e826c93c603887bc28827395e28251b74 Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Tue, 30 Sep 2025 18:40:04 +0100 Subject: [PATCH 15/18] Test 'alert' and 'Answering object.md questions --- Sprint-1/4-stretch-explore/objects.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Sprint-1/4-stretch-explore/objects.md b/Sprint-1/4-stretch-explore/objects.md index 0216dee56..407335b03 100644 --- a/Sprint-1/4-stretch-explore/objects.md +++ b/Sprint-1/4-stretch-explore/objects.md @@ -6,11 +6,28 @@ Open the Chrome devtools Console, type in `console.log` and then hit enter What output do you get? +-The output : ƒ log() { [native code] } + Now enter just `console` in the Console, what output do you get back? +-The output : console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, …} + a lot of functions under it. + Try also entering `typeof console` -Answer the following questions: +-The output : object + +-Answer the following questions: What does `console` store? + +-Answer : console is an object with debugging methods. +It does not store variables or result. It provide methods for outputting , data , object and more. + What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean? + +Answer: +-console is a built-in object. +-log and assert are properties of that object, specifically functions (methods). +-The console.assert() static method writes an error message to the console if the assertion is false. If the assertion is true, nothing happens. +-The console.log() static method outputs a message to the console. +-'.' means use this method from this object. From 87606331b8c7b313d31720a01d737c971e268d8b Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Wed, 1 Oct 2025 16:34:47 +0100 Subject: [PATCH 16/18] Editing answer question e. --- Sprint-1/3-mandatory-interpret/1-percentage-change.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Sprint-1/3-mandatory-interpret/1-percentage-change.js b/Sprint-1/3-mandatory-interpret/1-percentage-change.js index 6401edd42..07549098d 100644 --- a/Sprint-1/3-mandatory-interpret/1-percentage-change.js +++ b/Sprint-1/3-mandatory-interpret/1-percentage-change.js @@ -48,6 +48,7 @@ let carPrice = "10,000"; declaring a new variable priceAfterOneYear: let priceAfterOneYear = "8,543"; */ +// Editing : priceDifference and percentageChange are variables too. From c67261db3b7df0da2fcac20fdb3d6b26f7d31ce1 Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Wed, 1 Oct 2025 16:40:53 +0100 Subject: [PATCH 17/18] Reword the answer in Q:d --- Sprint-1/3-mandatory-interpret/2-time-format.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-1/3-mandatory-interpret/2-time-format.js b/Sprint-1/3-mandatory-interpret/2-time-format.js index 99a2db56e..3292a2c1d 100644 --- a/Sprint-1/3-mandatory-interpret/2-time-format.js +++ b/Sprint-1/3-mandatory-interpret/2-time-format.js @@ -37,7 +37,7 @@ Line 10 : console.log(). // d) Interpret line 4, what does the expression assigned to totalMinutes mean? /* -The expression gives the completed total minutes of the movie, by subtract the movie length in sec from the remaining seconds and divide the result by 60 to convert it to minutes +The expression gives the completed total minutes of the movie, by subtract the remainingSeconds from the movieLength and divide the result by 60 to convert it to minutes */ // e) What do you think the variable result represents? Can you think of a better name for this variable? From b763d763bfb98841480c796a5f97897ef8a5f8d2 Mon Sep 17 00:00:00 2001 From: Fares Bakhet Date: Wed, 1 Oct 2025 16:47:36 +0100 Subject: [PATCH 18/18] Use a lowercase to start a variable --- Sprint-1/3-mandatory-interpret/2-time-format.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-1/3-mandatory-interpret/2-time-format.js b/Sprint-1/3-mandatory-interpret/2-time-format.js index 3292a2c1d..09accdc3c 100644 --- a/Sprint-1/3-mandatory-interpret/2-time-format.js +++ b/Sprint-1/3-mandatory-interpret/2-time-format.js @@ -45,7 +45,7 @@ The expression gives the completed total minutes of the movie, by subtract the r /* The variable result shows(display) the total length of the movie in three sections (Hours:Minutes:seconds) in string format. - I can think of "MovieDuration" as a better name because it gives more description to the output. + I can think of "movieDuration" as a better name because it gives more description to the output. */ // f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer