Skip to content

Commit dfd2491

Browse files
committed
Addressed all comments for sprint 2
1 parent 0377355 commit dfd2491

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// Updated function:
1414
function formatAs12HourClock(time) {
1515
const hours = Number(time.slice(0, 2));
16-
const minutes = time.slice(3, 5);
16+
const minutes = time.slice(-2);
1717

1818
if (hours === 0) {
1919
return `12:${minutes} am`;

0 commit comments

Comments
 (0)