Skip to content

Commit be4e495

Browse files
Added more context and specically refer to the terms in the blank with it's right terminology as arguments
1 parent 25a5ac8 commit be4e495

1 file changed

Lines changed: 1 addition & 1 deletion

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
@@ -21,7 +21,7 @@ console.log(`The percentage change is ${percentageChange}`);
2121

2222

2323
// 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?
24-
// The error is occurring on line 5., and it's a SyntaxError: missing , The error is due to a missing comma in the replaceAll() method. The correct syntax should be replaceAll(",", ""). To fix this problem, we need to add the missing comma in the replaceAll() method on line 5
24+
// The error is occurring on line 5., and it's a SyntaxError: missing , The error is due to a missing comma in the replaceAll() method.//The error occurs on line 5. A SyntaxError is thrown because a comma is missing between the two arguments passed to the replaceAll() method. JavaScript uses commas to separate arguments in a function call. The programming term that belongs to the blank is call arguments as that is the actual value passed during a function call. The correct syntax should be replaceAll(",", ""). To fix this problem, we need to add the missing comma in the replaceAll() method on line 5
2525
// c) Identify all the lines that are variable reassignment statements
2626
// The variable reassignment statements are on the following lines:
2727
// Line 4: carPrice = Number(carPrice.replaceAll(",", ""));

0 commit comments

Comments
 (0)