We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be89563 commit 244451eCopy full SHA for 244451e
Sprint-2/5-stretch-extend/format-time.js
@@ -1,6 +1,7 @@
1
// This is the latest solution to the problem from the prep.
2
// Make sure to do the prep before you do the coursework
3
-// Your task is to write tests for as many different groups of input data or edge cases as you can, and fix any bugs you find.
+// Your task is to write tests for as many different groups of input data or edge cases as you can,
4
+// and fix any bugs you find.
5
6
function formatAs12HourClock(time) {
7
const hours = Number(time.slice(0, 2));
@@ -23,3 +24,5 @@ console.assert(
23
24
currentOutput2 === targetOutput2,
25
`current output: ${currentOutput2}, target output: ${targetOutput2}`
26
);
27
+
28
+console.log formatAs12HourClock("14:00"); // 2pm
0 commit comments