File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ console.log(`The last digit of 806 is ${getLastDigit(806)}`);
1919
2020// the output is 3 for everything
2121// Explain why the output is the way it is
22- // firstly because num is constant and it is a global variable outside the function. The last digit on 103 remain =s 3. It does not change
22+ // firstly because num is constant and it is a global variable outside the function. The last digit on 103 remains 3. It does not change
2323// =============> write your explanation here
2424// Finally, correct the code to fix the problem
2525// =============> write your new code here
Original file line number Diff line number Diff line change @@ -23,3 +23,23 @@ console.assert(
2323 currentOutput2 === targetOutput2 ,
2424 `current output: ${ currentOutput2 } , target output: ${ targetOutput2 } `
2525) ;
26+ const currentOutput3 = formatAs12HourClock ( "14:00" ) ;
27+ const targetOutput = "02:00 pm" ;
28+ console . assert (
29+ currentOutput3 === targetOutput3 ,
30+ `current output: ${ currentOutput3 } , target output: ${ targetOutput3 } `
31+ ) ;
32+
33+ const currentOutput4 = formatAsHourClock ( "00:00" ) ;
34+ const targetOutput4 = "12:00 am" ;
35+ console . assert (
36+ currentOutput4 === targetOutput4 ,
37+ `current output: ${ currentOutput4 } , target output: ${ targetOutput4 } `
38+ ) ;
39+
40+ const currentOutput5 = formatAsHourClock ( "17:00" ) ;
41+ const targetOutput5 = "05:00 pm" ;
42+ console . assert (
43+ currentOutput5 === targetOutput5 ,
44+ `currentOutput: ${ currentOutput5 } , target output: ${ targetOutput5 } `
45+ ) ;
You can’t perform that action at this time.
0 commit comments