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 5cf8a5a commit 0422ff0Copy full SHA for 0422ff0
Sprint-2/5-stretch-extend/format-time.js
@@ -5,8 +5,8 @@
5
function formatAs12HourClock(time) {
6
const hours = Number(time.slice(0, 2));
7
if (hours > 12) {
8
- time = hours - 12;
9
- return `${time.toString().padStart(2 , "0")}:00 pm`
+ const convertedHours= hours - 12;
+ return `${convertedHours.toString().padStart(2 , "0")}:00 pm`
10
}
11
return `${time} am`;
12
0 commit comments