Skip to content

Commit b03e74c

Browse files
committed
Address review feedback
1 parent ca8de22 commit b03e74c

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎Sprint-2/1-key-exercises/2-initials.js‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@ const lastName = "Johnson";
77

88
const initials = `${firstName.charAt(0)}${middleName.charAt(0)}${lastName.charAt(0)}`;
99

10-
// https://www.google.com/search?q=get+first+character+of+string+mdn
11-
12-
console.log(initials)
10+
console.log(initials);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ console.log(`The percentage change is ${percentageChange}%`);
1818
// Answer: 6 function calls.
1919

2020
// b) Run the code and identify the line where the error is coming from - why is this error occurring? How can you fix this problem?
21-
// Answer: line 5 {replaceAll(",", ""))} added , to fix the SyntaxError.
21+
// Answer:The error was a SyntaxError on the replaceAll line (missing/incorrect quotes/commas).
22+
// Fixed by using replaceAll(",", "") correctly so commas are removed before Number(...).
2223

2324
// c) Identify all the lines that are variable reassignment statements
2425
// Answer: carPrice = Number(carPrice.replaceAll(",", "")); line 4

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const movieLength = 9325; // length of movie in seconds
1+
const movieLength = 8784; // length of movie in seconds
22

33
const remainingSeconds = movieLength % 60;
44
const totalMinutes = (movieLength - remainingSeconds) / 60;
@@ -40,4 +40,3 @@ console.log(result);
4040
// Limitations:
4141
// - fractional values can produce messy decimals
4242
// - negative values do not make sense for a movie length.
43-
// Note: I have changed the movieLength from "8784" to "9325" for testing.

0 commit comments

Comments
 (0)