Skip to content

Commit c611ae5

Browse files
committed
Update 4.js
SyntaxError fixed..twelve instead of 12 and twentyFour instead of 24
1 parent 3d0ea75 commit c611ae5

File tree

1 file changed

+11
-2
lines changed
  • Sprint-1/2-mandatory-errors

1 file changed

+11
-2
lines changed

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
const 12HourClockTime = "20:53";
2-
const 24hourClockTime = "08:53";
1+
// const 12HourClockTime = "20:53";
2+
// const 24hourClockTime = "08:53";
3+
4+
// Variables cannot start with a number.
5+
// When JavaScript tries to run the code, it throws a SyntaxError.
6+
// To fix the error we can rename the variable to start with a letter, a underescore_ or a dollar sign $ instead of a number.
7+
8+
const twelveHourClockTime = "8:53";
9+
const twentyFourHourClockTime = "08:53";
10+
11+
// I changed the time to match the 12 and 24 hr clock format.

0 commit comments

Comments
 (0)