Skip to content

Commit 9f4f143

Browse files
committed
variables unable to start with a number, caused syntaxerror
1 parent e325f3c commit 9f4f143

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

  • Sprint-2/2-mandatory-errors

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1-
const 12HourClockTime = "8:53pm";
2-
const 24hourClockTime = "20:53";
1+
const Hour12ClockTime = "8:53pm";
2+
3+
console.log(Hour12ClockTime);
4+
5+
const hour24ClockTime = "20:53";
6+
7+
console.log(hour24ClockTime);
8+
9+
10+
11+
12+
Variable names cannot start with a number as Javascript doesnt allow it, it can contan number inside the variable but not at the beginning.

0 commit comments

Comments
 (0)