Skip to content

Commit 0605160

Browse files
committed
removing extra lines
1 parent d911165 commit 0605160

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • Sprint-2/2-mandatory-errors

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
const twelveHourClockTime = "8:53pm";
22
const twentyFourHourClockTime = "20:53";
33

4-
// 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.
54
// To convert 12HourClockTime to 24-hour format, we can use the following steps:
65
// 1. Split the string into hours and minutes using the split() method.
76
// 2. Check if the time is in the "pm" period. If it is, add 12 to the hours (unless it's 12pm).
87
// 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.
10-
// The error is SyntaxError: Invalid or unexpected token, because a variable name cannot start with a digit.
8+
//The error is SyntaxError: Invalid or unexpected token, because a variable name cannot start with a digit.

0 commit comments

Comments
 (0)