Skip to content

Commit 8b93cea

Browse files
committed
Explain error 2
1 parent 653cdab commit 8b93cea

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • Sprint-2/2-mandatory-errors

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

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

44
console.log(`I was born in ${cityOfBirth}`);
55
const cityOfBirth = "Bolton";
6+
7+
// The error returned is a reference error explaining that the variable cannot be accessed before initialisation, meaning that the variable needs to be declared first to access it.

0 commit comments

Comments
 (0)