Skip to content

Commit ab26532

Browse files
committed
Fix invalid variable names starting with numbers
1 parent 03d2804 commit ab26532

File tree

1 file changed

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

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
const 12HourClockTime = "20:53";
2-
const 24hourClockTime = "08:53";
1+
// The error occurs because variable names cannot start with numbers
2+
// JavaScript identifiers must begin with a letter, $ or _
3+
4+
const twelveHourClockTime = "20:53";
5+
const twentyFourHourClockTime = "08:53";

0 commit comments

Comments
 (0)