Skip to content

Commit bbcddb9

Browse files
committed
Interpret the error message
1 parent 2c9afad commit bbcddb9

File tree

1 file changed

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

1 file changed

+11
-2
lines changed

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
This is just an instruction for the first activity - but it is just for human consumption
2-
We don't want the computer to run these 2 lines - how can we solve this problem?
1+
// This is just an instruction for the first activity - but it is just for human consumption
2+
// We don't want the computer to run these 2 lines - how can we solve this problem?
3+
4+
// Interpretation:
5+
// The error "SyntaxError: Unexpected identifier 'is'" means that JavaScript found the word "is", but it didn’t make sense in that position.
6+
// It wasn’t valid code that JavaScript could understand.
7+
8+
// Why the error occurred:
9+
// The error occurred because the sentence was written as plain text instead of a comment.
10+
// To fix it, the sentence should be written as a comment (by adding // at the beginning) so that JavaScript ignores it.
11+

0 commit comments

Comments
 (0)