You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This is just an instruction for the first activity - but it is just for human consumption
2
2
// We don't want the computer to run these 2 lines - how can we solve this problem?
3
-
/* comment out any code you do not want the machine to run by add two forward slash to a single line comment
4
-
a single slash and a multiplication sign to both ends of a double line comment like this.
3
+
4
+
//The error found when running the code-> SyntaxError: Unexpected identifier 'is'.
5
+
// syntax errors means the grammar rules of the language has not been applied. The instruction is written in plain english in a js file. It is not written in js syntax so js cannot parse it.
6
+
7
+
// An identifier just means:
8
+
//A variable name
9
+
//A function name
10
+
// Or any word that isn’t a keyword
11
+
// So "is" is being treated like a variable name — and the parser wasn’t expecting one at that position.
12
+
13
+
// //Solution:
14
+
/*In this case, comment out the code by adding two forward slashes to a single line comment or
15
+
a single slash and a multiplication sign to both ends of a double line comment like the one used for this comment.
0 commit comments