Skip to content

Commit f1cf999

Browse files
committed
correct answers to b, c, d questions
1 parent 04e573d commit f1cf999

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ console.log(`The percentage change is ${percentageChange}`);
1414
// a) How many function calls are there in this file? Write down all the lines where a function call is made
1515
// 4(2), 5(2), 10
1616
// 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?
17-
// It was a syntax error, it can be fixed by adding the missing part (1 of 2 parentheses)
17+
// It was a syntax error, it can be fixed by adding the missing part (1 of 2 parentheses). Comma between 2 arguments was missing.
1818
// c) Identify all the lines that are variable reassignment statements
19-
// 4, 5, 7, 8
19+
// 4, 5
2020
// d) Identify all the lines that are variable declarations
21-
// 1, 2
21+
// 1, 2, 7, 8
2222
// e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression?
2323
// It turns/converts a string into a number by removing the comma and quotation marks (since they are non-number values)

0 commit comments

Comments
 (0)