Skip to content

Commit 0c7b749

Browse files
committed
Add comments explaining SyntaxError due to invalid identifier names
1 parent d65f2eb commit 0c7b749

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • Sprint-2/2-mandatory-errors

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
const 12HourClockTime = "8:53pm";
22
const 24hourClockTime = "20:53";
33

4-
console.log(12HourClockTime, 24hourClockTime);
4+
console.log(12HourClockTime, 24hourClockTime);
5+
6+
//There is a SyntaxError after running the code.
7+
//This error occurred because the identifiers '12HourClockTime' and '24hourClockTime' both start with a digit.

0 commit comments

Comments
 (0)