Skip to content

Commit 22907b2

Browse files
committed
format time file update
1 parent 4fd9db6 commit 22907b2

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

Sprint-2/2-mandatory-debug/2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
);

0 commit comments

Comments
 (0)