File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed
Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change 1- const calculation = 10 + 32 ;
2- const result = 40 ;
1+ // const calculation = 10 + 32;
2+ // const result = 40;
33// console.assert(calculation === result);
44
5- function formatAs12HourClock ( ) { }
6- console . log ( formatAs12HourClock ( ) )
7- console . assert ( formatAs12HourClock ( "08:00" ) === "08:00 am" , `current output: ${ formatAs12HourClock ( "08:00" ) } , target output: 08:00 am` ) ;
5+ // function formatAs12HourClock() {}
6+ // console.log(formatAs12HourClock())
7+ // console.assert(formatAs12HourClock("08:00") === "08:00 am" , `current output: ${formatAs12HourClock("08:00")} , target output: 08:00 am`);
8+
9+ function formatAs12HourClock ( time ) {
10+ return `${ time } am` ;
11+ }
12+
13+ const currentOutput = formatAs12HourClock ( "08:00" ) ;
14+ const targetOutput = "08:00 am" ;
15+ console . assert (
16+ currentOutput === targetOutput ,
17+ `current output: ${ currentOutput } , target output: ${ targetOutput } `
18+ ) ;
19+
20+ const currentOutput1 = formatAs12HourClock ( "23:00" ) ;
21+ const targetOutput1 = "11:00 pm" ;
22+ console . assert (
23+ currentOutput === targetOutput ,
24+ `current output: ${ currentOutput } , target output: ${ targetOutput } `
25+ ) ;
You can’t perform that action at this time.
0 commit comments