Skip to content

Commit fb13fb7

Browse files
authored
Fix Q: d
1 parent 84d6822 commit fb13fb7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ let carPrice = "10,000";
4747
4848
declaring a new variable priceAfterOneYear:
4949
let priceAfterOneYear = "8,543";
50+
51+
declaring a new variable priceDifference:
52+
const priceDifference = carPrice - priceAfterOneYear;
53+
54+
declaring a new variable percentageChange:
55+
const percentageChange = (priceDifference / carPrice) * 100;
5056
*/
5157

5258

0 commit comments

Comments
 (0)