Skip to content

Commit 846928b

Browse files
updated variable names to start with letters to fix syntax error
1 parent 2cd98a1 commit 846928b

File tree

1 file changed

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

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1-
const 12HourClockTime = "20:53";
2-
const 24hourClockTime = "08:53";
1+
const twelveHourClockTime = "20:53";
2+
const twentyFourHourClockTime = "08:53";
3+
4+
console.log(twelveHourClockTime, twentyFourHourClockTime);
5+
6+
//SyntaxError: Invalid or unexpected token
7+
8+
// This error is happening because variable names cannot start with a number.
9+
// To fix this error, we can change the variable names to start with a letter instead of a numbers.

0 commit comments

Comments
 (0)