Skip to content

Commit be57b2d

Browse files
updating changes
1 parent 3f9f362 commit be57b2d

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

Sprint-2/2-mandatory-debug/0.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
2424

25-
// I removed the first console.log because it didn't seem necessary to print out 320 but
25+
// I removed the first console.log because it didn't seem necessary to print out 320
2626
// if you need to print 320 as well as the final console-log statement then console.log(a * b)
2727
// can be added back in but it would need to be before the return statement because if it is
2828
// after the return statement it will never be reached and the value will not be printed out

Sprint-2/2-mandatory-debug/1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function sum(a, b) {
99

1010
console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
1111

12-
// =============> there shouldn't be a semi-colon after return
12+
// =============> I think there shouldn't be a semi-colon after return
1313
// this will signify the end of function so a + b will not be performed
1414
// therefore there is no answer to return to print in the console.log function
1515

Sprint-2/2-mandatory-debug/2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ console.log(`The last digit of 806 is ${getLastDigit(806)}`);
3434
// console.log(`The last digit of 105 is ${getLastDigit(105)}`);
3535
// console.log(`The last digit of 806 is ${getLastDigit(806)}`);
3636

37-
// removed const num = 103; and added num as a parameter to the function
37+
// removed const num = 103; and then added num as a parameter to the function
3838
// getLastDigit so that it can take in the value of num when the function is
3939
// called and return the last digit of that number instead of always using
4040
// the global value of num which was 103.

Sprint-2/3-mandatory-implement/1-bmi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// It should return their Body Mass Index to 1 decimal place
1616

1717
function calculateBMI(weight, height) {
18-
const bmi = weight / (height * height);
18+
const bmi = weight / (height * height); //calculation to calculate BMI
1919
return bmi.toFixed(1);
2020
}
2121
console.log(calculateBMI(70, 1.73));

Sprint-2/3-mandatory-implement/2-cases.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function toUpperSnakeCase(str) {
2424
// checks if the character is an uppercase letter or a digit
2525

2626
}).join('');
27-
// joins the array of characters back into a single string with underscores instead of spaces
27+
// joins the array of characters back into a single string and replaces spaces with underscores
2828
}
2929

3030
console.log(toUpperSnakeCase("there-once was/a young lady from+London"));

Sprint-2/3-mandatory-implement/3-to-pounds.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ return `£${pounds}.${pence}`;
1414
}
1515

1616
console.log(getPenceString("399p"));
17-
// tested with 123p 1200p 24589p 89p 9p 0p
17+
// tested with 123p 1200p 24589p 89p 9p and 0p

Sprint-2/4-mandatory-interpret/time-format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pad(0) returns the string representation of 0, padded with zeros to a minimum le
4242
// =============> We look at the last call to pad, which is pad(remaining_seconds).
4343
remaining_seconds is calculated as seconds % 60.
4444
For the input 61, seconds % 60 equals 1.
45-
So, pad(remaining_seconds) is equivalent to pad(1). Therefore, the value assigned to num in the last call to pad is 1.
45+
So, pad(remaining_seconds) is equivalent to pad(1). The value assigned to num in the last call to pad is 1.
4646

4747
// e) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer
4848
// =============> For the input 61, remaining_seconds will be 1. So, pad(1) will return "01". Therefore, the value assigned to num is 1.

0 commit comments

Comments
 (0)