Skip to content

Commit 72a2ea2

Browse files
authored
Fix the code
1 parent 709bed6 commit 72a2ea2

File tree

1 file changed

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

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
1+
/*
2+
The old code:
13
const 12HourClockTime = "20:53";
2-
const 24hourClockTime = "08:53";
4+
const 24hourClockTime = "08:53";
5+
console.log(24hourClockTime);*/
6+
7+
// It is giving a syntax error
8+
// The reason is that variable names cannot start with a number
9+
10+
// Updated code:
11+
const hourClockTime12 = "20:53";
12+
const hourClockTime24 = "08:53";
13+
console.log(hourClockTime24, hourClockTime12);

0 commit comments

Comments
 (0)