Skip to content

Commit 910726e

Browse files
author
lintsang
committed
recorrect 3-mandatory-interpret/1-percentage-change.js
1 parent 7e23fc3 commit 910726e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ console.log(`The percentage change is ${percentageChange}`);
1212
// Read the code and then answer the questions below
1313

1414
// a) How many function calls are there in this file? Write down all the lines where a function call is made
15-
// There is 3 function calls in line 4, 5 and 10. Number() and console.log() both are the function.
15+
// There is 5 function calls in line 4, 5 and 10. Number() and console.log() both are the function.
16+
// And XXX.replaceAll(",", "") is another function call. So in total there are 5 function calls in this code.
1617

1718
// 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?
1819
// It shows "SyntaxError: missing ) after argument list" point at the end of line 5. I can see there is a missing comma in method .replaceAll() comparing to line method structure. By adding the comma after the ",", the error is solved.

0 commit comments

Comments
 (0)