Skip to content

Commit f84e215

Browse files
committed
Corrections after first review in 1.1, 1.4, 3.1, 3.2, 3.3
1 parent 9d51d3f commit f84e215

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

Sprint-1/1-key-exercises/1-count.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ count = count + 1;
55
// Line 1 is a variable declaration, creating the count variable with an initial value of 0
66
// Describe what line 3 is doing, in particular focus on what = is doing
77

8-
// Line 3 is updating the value of the count variable. The = operator is an assignment operator, which assigns the value on the right (count + 1) to the variable on the left (count). In this case, it takes the current value of count (which is 0), adds 1 to it, and then assigns the result (1) back to count. So after this line executes, count will have a new value of 1.
8+
// Line 3 is updating the value of the count variable. The = operator is an assignment operator,
9+
// which assigns the value on the right (count + 1) to the variable on the left (count). In this case,
10+
// it takes the current value of count (which is 0), adds 1 to it, and then assigns the result (1)
11+
// back to count. So after this line executes, count will have a new value of 1.
12+
// It has incremented with 1.

Sprint-1/1-key-exercises/4-random.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
1414
//The random number will always be an integer because Math.floor() is used to round
1515
//down the result.
1616
//At the end the value "minimum" is added to guarantee that the generated "num" is at least 1
17-
//"num" is a random number generator with results between 1 and 100.
17+
//"num" is a random number generator with results between 1 and 100, including 1 but excluding 100

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ console.log(`The percentage change is ${percentageChange}`);
1717

1818
carPrice = Number(carPrice.replaceAll(",", ""));
1919
priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," ""));
20-
20+
Number; //called twice
2121
const priceDifference = carPrice - priceAfterOneYear;
2222
const percentageChange = (priceDifference / carPrice) * 100;
2323

2424

2525
// 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?
2626

27-
// There is a comma missing in: replaceAll("," ""));
27+
// There is a comma missing between te arguments in: replaceAll("," ""));
2828
// It should be: replaceAll(",", ""));
2929

3030

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ console.log(result);
1919

2020
// b) How many function calls are there?
2121

22-
// There are 2: console.log and the template literal for the result string
22+
// There is 1: console.log
2323

2424

2525
// c) Using documentation, explain what the expression movieLength % 60 represents
@@ -41,7 +41,9 @@ const totalMinutes = (movieLength - remainingSeconds) / 60;
4141

4242
// "result" represents the result of the calculations, being the total length of the movie
4343
// transcribed to hours/minutes/seconds. It would have been much clearer to not give the mathematical
44-
// output as the name but instead the usability of this output, such as "movieLengthInHours"
44+
// output as the name but instead the usability of this output, such as "movieLengthHMS" or the clearer
45+
// but rather lengthy movieLengthHoursMinutesSeconds
46+
4547

4648

4749

Sprint-1/3-mandatory-interpret/3-to-pounds.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const pounds = paddedPenceNumberString.substring(
1313

1414
const pence = paddedPenceNumberString
1515
.substring(paddedPenceNumberString.length - 2)
16-
.padEnd(2, "0");
1716

1817
console.log(${pounds}.${pence}`);
1918

Sprint-2/Project-CLI-Treasure-Hunt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 4374e4e6b862b0a110e806b6115f3f6b3c22b26a

0 commit comments

Comments
 (0)