Skip to content

Commit 26b2e4d

Browse files
committed
fix error
1 parent 5259e12 commit 26b2e4d

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ let carPrice = "10,000";
22
let priceAfterOneYear = "8,543";
33

44
carPrice = Number(carPrice.replaceAll(",", ""));
5-
priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," ""));
5+
priceAfterOneYear = Number(priceAfterOneYear.replaceAll(",", ""));
66

77
const priceDifference = carPrice - priceAfterOneYear;
88
const percentageChange = (priceDifference / carPrice) * 100;
@@ -46,5 +46,3 @@ console.log(...) */
4646
/* e) the expression Number(carPrice.replaceAll(",","")) removes the commas from the price string
4747
and then converts it into a number. This is done so the price can be used in
4848
calculations like subtraction and division. */
49-
50-

0 commit comments

Comments
 (0)