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 e6d78a0 commit 4ffd303Copy full SHA for 4ffd303
1 file changed
Sprint-1/2-mandatory-errors/2.js
@@ -1,5 +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
-console.log(`I was born in ${cityOfBirth}`);
5
const cityOfBirth = "Bolton";
+console.log(`I was born in ${cityOfBirth}`);
6
+
7
8
+/* The variable is declared after it's been used and when we run the code we get this > ReferenceError: Cannot access
9
+ 'cityOfBirth' before initialization */
0 commit comments