There was an error while loading. Please reload this page.
1 parent 8473252 commit 3176794Copy full SHA for 3176794
2 files changed
Sprint-3/3-mandatory-implement/1-bmi.js
@@ -17,7 +17,7 @@
17
function calculateBMI(weight, height) {
18
let bmiNum = weight / (height * height);
19
bmiNum = bmiNum.toFixed(1);
20
- return typeof bmiNum;
+ return bmiNum;
21
}
22
23
console.log(calculateBMI(70, 1.73));
Sprint-3/5-stretch-extend/format-time.js
@@ -4,7 +4,7 @@
4
5
function formatAs12HourClock(time) {
6
const hours = Number(time.slice(0, 2));
7
- const minutes = Number(time.slice(3, 5));
+ const minutes = Number(time.slice(-2));
8
if (hours > 12) {
9
return `${(hours - 12).toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")} pm`;
10
} else if (hours === 12) {
0 commit comments