Skip to content

Commit 82a4cf1

Browse files
committed
Sprint 1 interpret: fix percentage-change syntax and tidy notes
1 parent e8f5887 commit 82a4cf1

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ let carPrice = "10,000";
22
let priceAfterOneYear = "8,543";
33

44
carPrice = Number(carPrice.replaceAll(",", ""));
5-
priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," ""));
6-
5+
priceAfterOneYear = Number(priceAfterOneYear.replaceAll(",", ""));
76
const priceDifference = carPrice - priceAfterOneYear;
87
const percentageChange = (priceDifference / carPrice) * 100;
98

Sprint-1/3-mandatory-interpret/2-time-format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ console.log(result);
2222

2323
// e) What do you think the variable result represents? Can you think of a better name for this variable?
2424

25-
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
25+
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer

Sprint-1/3-mandatory-interpret/answers.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ Also, minutes and seconds are not padded with leading zeros, so values like 2:3:
120120

121121
## 3-to-pounds.js
122122

123-
### Step-by-step breakdown (line by line)
124-
125123
1) `const penceString = "399p";`
126124
- Declares a string containing a price in pence, with a trailing `p` character.
127125

0 commit comments

Comments
 (0)