We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce03285 commit cedc8a3Copy full SHA for cedc8a3
Sprint-1/2-mandatory-errors/2.js
@@ -1,8 +1,9 @@
1
// Currently trying to print the string "I was born in Bolton" but it isn't working...
2
// what's the error ?
3
4
-// this is a very common JavaScript error related to variable hoisting and the temporal dead zone.
5
-// Simply declare the variable before you use it
+// This is related to variable hoisting.
+// const keywork is a block scope and unlike var it's not hoisted automatically.
6
+// The easiest solution is to declare the variable before to use it
7
8
const cityOfBirth = "Bolton";
9
console.log(`I was born in ${cityOfBirth}`);
0 commit comments