File tree Expand file tree Collapse file tree
Sprint-2/5-stretch-extend Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,3 +23,24 @@ console.assert(
2323 currentOutput2 === targetOutput2 ,
2424 `current output: ${ currentOutput2 } , target output: ${ targetOutput2 } `
2525) ;
26+
27+ const currentOutput3 = formatAs12HourClock ( "00:00" ) ;
28+ const targetOutput3 = "12:00 am" ;
29+ console . assert (
30+ currentOutput3 === targetOutput3 ,
31+ `current output: ${ currentOutput3 } , target output: ${ targetOutput3 } `
32+ ) ;
33+
34+ const currentOutput4 = formatAs12HourClock ( "12:00" ) ;
35+ const targetOutput4 = "12:00 pm" ;
36+ console . assert (
37+ currentOutput4 === targetOutput4 ,
38+ `current output: ${ currentOutput4 } , target output: ${ targetOutput4 } `
39+ ) ;
40+
41+ console . log ( formatAs12HourClock ( "08:00" ) ) ;
42+ console . log ( formatAs12HourClock ( "23:00" ) ) ;
43+ console . log ( formatAs12HourClock ( "00:00" ) ) ;
44+ console . log ( formatAs12HourClock ( "12:00" ) ) ;
45+
46+ //The function did not handle the edge cases 00:00 and 12:00.
You can’t perform that action at this time.
0 commit comments