Skip to content

Commit 3176794

Browse files
committed
comments answered , changed return of 1-bmi.js and format-time.js
1 parent 8473252 commit 3176794

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
function calculateBMI(weight, height) {
1818
let bmiNum = weight / (height * height);
1919
bmiNum = bmiNum.toFixed(1);
20-
return typeof bmiNum;
20+
return bmiNum;
2121
}
2222

2323
console.log(calculateBMI(70, 1.73));

‎Sprint-3/5-stretch-extend/format-time.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
function formatAs12HourClock(time) {
66
const hours = Number(time.slice(0, 2));
7-
const minutes = Number(time.slice(3, 5));
7+
const minutes = Number(time.slice(-2));
88
if (hours > 12) {
99
return `${(hours - 12).toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")} pm`;
1010
} else if (hours === 12) {

0 commit comments

Comments
 (0)