Skip to content

Commit 5a7447d

Browse files
committed
edit my comment for further explantion
1 parent 3ab1fb2 commit 5a7447d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ const percentageChange = (priceDifference / carPrice) * 100;
99

1010
console.log(`The percentage change is ${percentageChange}`);
1111

12-
//1. There are 4 function calls in line 4 and 5
12+
//1. There are 5 function calls in line 4 , 5 and 10
1313
// * number()and the second one is .replaceall() in line 4
1414
// * number() and the second one is .replaceall()in line 4
15+
// * console.log()
1516
// 2. The error is coming from the line 5, because there was no comma in the replaceAll() method .
1617
// 3. line 4 and 5 are the variable reassignment statments.
1718
// 4. line 1 ,2 ,7 and 8 are lines where variable declarions happened
1819
// 5. *The method .replaceAll() in line 4 is replacing the coma (,) with nothing("") in the "10,000" and the output is "10000",
19-
// the number function converts the string "10000" into a number.
20+
// the number() function converts the string "10000" into a number.
2021
// *The method .replaceAll() in line 4 is replacing the coma(,) with nothing("") in the "8,543" and the output is "8543"
21-
// the number function coverts the string "8543" into a number which is 8543.
22+
// the number() function coverts the string "8543" into a number which is 8543.

0 commit comments

Comments
 (0)