Skip to content

Commit c41aa67

Browse files
committed
task 4.js completed and explained
1 parent 5b4ed9d commit c41aa67

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • Sprint-2/2-mandatory-errors

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
const HourClockTime1 = "8:53pm";
22
const hourClockTime2 = "20:53";
33
console.log(`${HourClockTime1}, ${hourClockTime2}`)
4+
5+
// The code displayed the error "SyntaxError: Invalid or unexpected token", this is because javaScript does not understand the variable name format.
6+
// This error is solved by renaming the variable name starting it with an alphabet and avoiding starting the variable with a number.

0 commit comments

Comments
 (0)