Skip to content

Commit e3bb58b

Browse files
wrote the code and corrected the variable namet 'targetOutput to target output' for the assertion to work
1 parent 0241153 commit e3bb58b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ function formatAs12HourClock(time) {
1010
if (hours===12){
1111
return `${hours}:00 pm`;
1212
}
13+
if (hours===0){
14+
return `${12}:00 am `;
15+
}
1316
return `${time} am`;
1417
}
1518

@@ -38,6 +41,6 @@ const currentOutput4 = formatAs12HourClock("00:00");
3841
const targetOutput4 = "12:00 am";
3942
console.assert(
4043
currentOutput4 === targetOutput4,
41-
`current output: ${currentOutput4}, targetOutput: ${targetOutput4}`
44+
`current output: ${currentOutput4}, target output: ${targetOutput4}`
4245
);
4346

0 commit comments

Comments
 (0)