There was an error while loading. Please reload this page.
1 parent e331dbb commit 74a3d77Copy full SHA for 74a3d77
1 file changed
Sprint-2/2-mandatory-errors/2.js
@@ -1,5 +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
+const cityOfBirth = "Bolton";
4
5
console.log(`I was born in ${cityOfBirth}`);
-const cityOfBirth = "Bolton";
6
+
7
+// return has not been defined before it is used in the console.log statement.
8
+// To fix this, you should declare and assign a value to the variable cityOfBirth before using it in the console.log statement.
9
+// To do this, you can move the line const cityOfBirth = "Bolton"; above the console.log statement.
10
+// This way, the variable will be defined before it is used, and the code will work as expected.
0 commit comments