Skip to content

Commit ee0dcaf

Browse files
Wrote a code to fix the assertion
1 parent cae676c commit ee0dcaf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Sprint-2/5-stretch-extend/format-time.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ function formatAs12HourClock(time) {
77
if (hours > 12) {
88
return `${hours - 12}:00 pm`;
99
}
10+
if (hours===12){
11+
return `${hours}:00 pm`;
12+
}
1013
return `${time} am`;
1114
}
1215

0 commit comments

Comments
 (0)