Skip to content

Commit 93705d4

Browse files
removed the white space after the am in the current ouput for the midnight code in the function body as noticed that assertion still fails
1 parent e3bb58b commit 93705d4

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function formatAs12HourClock(time) {
1111
return `${hours}:00 pm`;
1212
}
1313
if (hours===0){
14-
return `${12}:00 am `;
14+
return `${12}:00 am`;
1515
}
1616
return `${time} am`;
1717
}
@@ -44,3 +44,10 @@ currentOutput4 === targetOutput4,
4444
`current output: ${currentOutput4}, target output: ${targetOutput4}`
4545
);
4646

47+
const currentOutput5 = formatAs12HourClock("13:00");
48+
const targetOutput5 = "01:00 pm";
49+
console.assert(
50+
currentOutput5 === targetOutput5,
51+
`current output: ${currentOutput5}, target output: ${targetOutput5}`
52+
);
53+

0 commit comments

Comments
 (0)