Skip to content

Commit 356c45f

Browse files
correcting my answers on the reassignment and declaration variables
1 parent ae0d9d5 commit 356c45f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ console.log(`The percentage change is ${percentageChange}`);
2727
*/
2828

2929
// d) Identify all the lines that are variable declarations
30-
/* const carPrice = Number(carPrice.replaceAll(",", "")); Line 7
31-
const percentageChange = (priceDifference / carPrice) * 100; line 8
30+
/*
31+
let carPrice = "10,000"; ==>line 1
32+
let priceAfterOneYear = "8,543"; ==>line 2
33+
const priceDifference = carPrice - priceAfterOneYear; line ==> 7
34+
const percentageChange = (priceDifference / carPrice) * 100; line ==> 8
3235
*/
3336

3437
// e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression?

0 commit comments

Comments
 (0)