Skip to content

Commit d7626de

Browse files
committed
fix(sprint-1): resolve ReferenceError by declaring greeting outside block scope
1 parent 103635d commit d7626de

File tree

1 file changed

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

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
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+
// Answer: Use comments (//) to prevent execution
5+
// SyntaxError: Unexpected identifier - plain text is not valid JavaScript
6+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#comments

0 commit comments

Comments
 (0)