Skip to content

Commit 67ff52f

Browse files
committed
Added missing const variable declaration
1 parent 192c85e commit 67ff52f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," ""));
3030

3131
let carPrice = "10,000";
3232
let priceAfterOneYear = "8,543";
33+
3334
const priceDifference = carPrice - priceAfterOneYear;
3435
const percentageChange = (priceDifference / carPrice) * 100;
3536

36-
3737
// e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression?
3838
replaceAll gets rid of the commas "10,000" becomes "10000".
3939

0 commit comments

Comments
 (0)