There was an error while loading. Please reload this page.
1 parent 4c7f5d9 commit 04de5cbCopy full SHA for 04de5cb
1 file changed
Sprint-2/2-mandatory-errors/2.js
@@ -1,10 +1,10 @@
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}`);
+const cityOfBirth = "Bolton";
6
7
-//ReferenceError is happening
+//ReferenceError is happening as the const is after the console.log request for it, so the order is wrong.
8
9
-const cityOfBirth = "Bolton";
10
-console.log(`I was born in ${cityOfBirth}`);
+// const cityOfBirth = "Bolton";
+// console.log(`I was born in ${cityOfBirth}`);
0 commit comments