Skip to content

Commit efd42ad

Browse files
committed
answered e) and added line numbers to c) and d)
1 parent 6edc642 commit efd42ad

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ console.log(`The percentage change is ${percentageChange}`);
2222
// The error is coming from line 5. There is a separator missing from the function call. Insert a comma to fix the problem.
2323

2424
// c) Identify all the lines that are variable reassignment statements
25+
// carPrice = Number(carPrice.replaceAll(",", ""));
26+
// priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," ""));
2527

2628
// d) Identify all the lines that are variable declarations
29+
// let carPrice = "10,000";
30+
// let priceAfterOneYear = "8,543";
31+
// const priceDifference = carPrice - priceAfterOneYear;
32+
// const percentageChange = (priceDifference / carPrice) * 100;
2733

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

0 commit comments

Comments
 (0)