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 658e7a7 commit bad8580Copy full SHA for bad8580
Sprint-1/2-mandatory-errors/2.js
@@ -3,3 +3,11 @@
3
4
console.log(`I was born in ${cityOfBirth}`);
5
const cityOfBirth = "Bolton";
6
+
7
+// The error is that the variable cityOfBirth is used before it is declared and assigned a value.
8
+// To fix the error, we need to declare and assign a value to cityOfBirth before using it in the console.log statement.
9
10
+/* Corrected code:
11
+const cityOfBirth = "Bolton";
12
+console.log(`I was born in ${cityOfBirth}`);
13
+*/
0 commit comments