Skip to content

Commit 744b0a7

Browse files
committed
more changes on percentage change
1 parent 293350c commit 744b0a7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ console.log(`The percentage change is ${percentageChange}`);
2424

2525
// d) Identify all the lines that are variable declarations
2626
//Line 1, line 2, line 7 and line 8 have variable declarations
27+
// Here, we have declared variables by using let and const. We have variable called carPrice, priceAfterOneYear, priceDifference and percentageChange.
28+
// We have given values to these variables as well which can be seen after the equals sign.
2729

2830
// e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression?
2931
//This expression removes the comma in the price from 10,000 to 10000
32+
//Here, every time the function reads a comma (","), it replaces the comma with "" which is basically an empty space. In other words, it removes the comma in a expression

0 commit comments

Comments
 (0)