Skip to content

Commit 188692d

Browse files
committed
docs: adding title to better understanding
1 parent 924741c commit 188692d

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

Sprint-1/interpret/percentage-change.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,20 @@ console.log(`The percentage change is ${percentageChange}`);
4444
// now with the number cleaned we can convert this string in number with the method Number().
4545

4646

47-
48-
49-
5047

48+
// ---------- console.log each step to see the results ----------
5149

52-
// let carPrice = "10,000";
53-
// let priceAfterOneYear = "8,543";
50+
// let carPrice = "10,000";
51+
// let priceAfterOneYear = "8,543";
5452

55-
// carPrice = Number(carPrice.replaceAll(",", ""));
56-
// console.log(carPrice); // the commas are removed and the string is converted to a number
53+
// carPrice = Number(carPrice.replaceAll(",", ""));
54+
// console.log(carPrice); // the commas are removed and the string is converted to a number
5755

58-
// priceAfterOneYear = Number(priceAfterOneYear.replaceAll(",", ""));
59-
// console.log(priceAfterOneYear); // the commas are removed and the string is converted to a number
56+
// priceAfterOneYear = Number(priceAfterOneYear.replaceAll(",", ""));
57+
// console.log(priceAfterOneYear); // the commas are removed and the string is converted to a number
6058

61-
// const priceDifference = carPrice - priceAfterOneYear;
62-
// console.log(`The price difference is ${priceDifference}`);
59+
// const priceDifference = carPrice - priceAfterOneYear;
60+
// console.log(`The price difference is ${priceDifference}`);
6361

64-
// const percentageChange = (priceDifference / carPrice) * 100;
65-
// console.log(`The percentage change is ${percentageChange}`);
62+
// const percentageChange = (priceDifference / carPrice) * 100;
63+
// console.log(`The percentage change is ${percentageChange}`);

0 commit comments

Comments
 (0)