Skip to content

Commit 6c190f1

Browse files
committed
changes to Sprint1 updated
1 parent 28c854e commit 6c190f1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Sprint-1/3-mandatory-interpret/1-percentage-change.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ console.log(`The percentage change is ${percentageChange}`);
1818
// a) How many function calls are there in this file? Write down all the lines where a function call is made
1919
// There are 3 function calls in this file. They are on lines 4, 5, and 10. The function calls are: two uses of replaceAll,and one console.log.
2020
// 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?
21-
// The error is coming from lines 4 and 5 (which I have commed out). The error is occurring because there is a space between the comma and the closing quotation mark in the second argument of the replaceAll function. This causes the function to look for a comma followed by a space, which does not exist in the string. To fix this problem, have removed the space between the comma and the closing quotation mark in both lines, on lines 7&8.
21+
// The error is coming from lines 4 and 5 (which I have comed out). The error is occurring because there is a space between the comma and the closing quotation mark in the second argument of the replaceAll function. This causes the function to look for a comma followed by a space, which does not exist in the string. To fix this problem, have removed the space between the comma and the closing quotation mark in both lines, on lines 7&8.
2222
// c) Identify all the lines that are variable reassignment statements
2323
// The variable reassignment statements are on lines 7 and 8, where carPrice and priceAfterOneYear are being reassigned to the result of the replaceAll function calls.
2424

Sprint-2/2-mandatory-debug/2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// Predict the output of the following code:
44
// =============> Write your prediction here
5-
5+
//theoutput will be an error because the function getLastDigit does not take any parameters, but it is being called with arguments (42, 105, 806). The error message will likely indicate that getLastDigit is not defined or that it cannot be called with arguments.
66
const num = 103;
77

88
function getLastDigit() {

0 commit comments

Comments
 (0)