Skip to content

Commit 923135a

Browse files
Fix invalid variable names
1 parent 92011f6 commit 923135a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • Sprint-2/2-mandatory-errors

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
const 12HourClockTime = "8:53pm";
2-
const 24hourClockTime = "20:53";
1+
const Hour12ClockTime = "8:53pm";
2+
const hour24ClockTime = "20:53";
3+
console.log(Hour12ClockTime + " " + hour24ClockTime);
4+
5+
// Error: SyntaxError: Invalid or unexpected token
6+
// Why: A JavaScript variable name cannot start with a number.

0 commit comments

Comments
 (0)