Skip to content

Commit bf156e2

Browse files
committed
completed task in Sprint-1/2-mandatory-errors/2.js
1 parent ac11085 commit bf156e2

File tree

1 file changed

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

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
// Currently trying to print the string "I was born in Bolton" but it isn't working...
22
// what's the error ?
33

4-
console.log(`I was born in ${cityOfBirth}`);
4+
// console.log(`I was born in ${cityOfBirth}`);
5+
// const cityOfBirth = "Bolton";
6+
//Uncaught ReferenceError ReferenceError: Cannot access 'cityOfBirth' before initialization is thrown because we are trying to access cityOfBirth before it is declared.
7+
58
const cityOfBirth = "Bolton";
9+
console.log(`I was born in ${cityOfBirth}`);
10+

0 commit comments

Comments
 (0)