Skip to content

Commit cd6f8ff

Browse files
authored
Clarify comments on function calls and errors
Updated comments for clarity on function calls and error explanation.
1 parent e57f968 commit cd6f8ff

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,15 @@ 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
//There are 5 function calls:
1616
//replaceAll
17-
//Line 4
17+
//Line 4 and 5
1818
//Number(...)
19-
//Line 4
20-
//priceAfterOneYear.replaceAll(",", "")
21-
//Line 5
22-
//Number(...)
23-
//Line 5
24-
//priceAfterOneYear.replaceAll(",", "")
25-
//Line 10 ,console.log
19+
//Line 4 and 5
20+
//console.log()
21+
//Line 10 ,
2622

2723
// 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?
28-
//error:line 5,SyntaxError: missing ) after argument list,missing a comma between the two arguments.
24+
//error:line 5,SyntaxError: missing ) after argument list,there is a missing comma between the two arguments "," and " "
25+
2926
// c) Identify all the lines that are variable reassignment statements
3027
//carPrice = Number(carPrice.replaceAll(",", ""));
3128
//priceAfterOneYear = Number(priceAfterOneYear.replaceAll(",", ""));

0 commit comments

Comments
 (0)