Skip to content

Commit 1631f4e

Browse files
committed
Fixed invalid variable names in 4.js and replaced smart quotes with valid JavaScript strings
1 parent 8f50754 commit 1631f4e

File tree

1 file changed

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

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
const 12HourClockTime = "20:53";
2-
const 24hourClockTime = "08:53";
1+
// Prediction: The code will fail because variable names cannot start with a number.
2+
// JavaScript identifiers must begin with a letter, $, or _. Starting with a 12 or 24 is invalid.
3+
// The quotes used are also smart quotes which will cause a syntax error.
4+
5+
// Corrected code:
6+
7+
const twelveHourClockTime = "20:53";
8+
const twentyFourHourClockTime = "08:53";

0 commit comments

Comments
 (0)