Skip to content

Commit e781b95

Browse files
committed
Clarify variable naming rules in comments and enhance example output for better understanding
1 parent 4247c11 commit e781b95

File tree

1 file changed

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

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
11
const 12HourClockTime = "20:53";
2-
const 24hourClockTime = "08:53";
2+
const 24hourClockTime = "08:53";
3+
4+
5+
6+
console.log(12HourClockTime);
7+
console.log(24hourClockTime);
8+
9+
// it throws a SyntaxError: Invalid or unexpected token because variable names cannot start with a number.
10+
// The error is that we are trying to assign a string value to a variable that starts with a number, which is not allowed in JavaScript.
11+
// Variable names cannot start with a number.
12+

0 commit comments

Comments
 (0)