Skip to content

Commit e1e04e8

Browse files
committed
Add clarification comment on variable hoisting error in example
1 parent 8b1f048 commit e1e04e8

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

Sprint-1/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 is that we are trying to use the variable cityOfBirth before it has been declared and assigned a value.

0 commit comments

Comments
 (0)