Skip to content

Commit 1716943

Browse files
committed
fix: move cityOfBirth declaration before console log
1 parent 689213b commit 1716943

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • Sprint-2/2-mandatory-errors

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// Currently trying to print the string "I was born in Bolton" but it isn't working...
22
// what's the error ?
3+
//'cityOfBirth' cannot access before initialization
4+
5+
// console.log(`I was born in ${cityOfBirth}`);
6+
// const cityOfBirth = "Bolton";
37

4-
console.log(`I was born in ${cityOfBirth}`);
58
const cityOfBirth = "Bolton";
9+
console.log(`I was born in ${cityOfBirth}`);

0 commit comments

Comments
 (0)