Skip to content

Commit 7896992

Browse files
Identify reference error and also state the remedy.
1 parent 145e443 commit 7896992

File tree

1 file changed

+4
-0
lines changed
  • Sprint-1/2-mandatory-errors

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33

44
console.log(`I was born in ${cityOfBirth}`);
55
const cityOfBirth = "Bolton";
6+
7+
8+
//ReferenceError: Cannot access 'cityOfBirth' before initialization
9+
// you always need to declare a variable before using it.

0 commit comments

Comments
 (0)