Skip to content

Commit 5775809

Browse files
committed
fix error in 4js
1 parent 1cd3d6d commit 5775809

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • Sprint-1/2-mandatory-errors

Sprint-1/2-mandatory-errors/4.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const 12HourClockTime = "8:53pm";
2-
const 24hourClockTime = "20:53";
1+
const twelveHourClockTime = "8:53pm";
2+
const twentyFourHourClockTime = "20:53";
33

44
// 12 Hour clock time is a string that represents the time in 12-hour format, while 24hourClockTime is a string that represents the time in 24-hour format.
55
// To convert 12HourClockTime to 24-hour format, we can use the following steps:
66
// 1. Split the string into hours and minutes using the split() method.
77
// 2. Check if the time is in the "pm" period. If it is, add 12 to the hours (unless it's 12pm).
88
// 3. If the time is in the "am" period and the hour is 12, set the hour to 0.
9-
// 4. Format the hours and minutes into a string in 24-hour format.
9+
// 4. Format the hours and minutes into a string in 24-hour format.

0 commit comments

Comments
 (0)