Skip to content

Commit af41f53

Browse files
amendments made
1 parent d6e7596 commit af41f53

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616

1717
function calculateBMI(weight, height) {
1818
// return the BMI of someone based off their weight and height
19+
// this will be a number to 1 decimal place
1920
const bmi = weight / (height * height); //calculation to calculate BMI
20-
return bmi.toFixed(1);
21+
return Number(bmi.toFixed(1));
2122
}
2223
console.log(calculateBMI(70, 1.73));
24+
25+
// tested and it works, the function calculates the BMI correctly and returns it to 1 decimal place.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ 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 and replaces spaces with underscores
27+
// joins the array of characters back into a single string and replaces spaces or special
28+
// characters such as "?" with underscores
2829
}
2930

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

0 commit comments

Comments
 (0)