There was an error while loading. Please reload this page.
1 parent 4b1680e commit 0504972Copy full SHA for 0504972
1 file changed
Sprint-2/2-mandatory-errors/2.js
@@ -1,7 +1,8 @@
1
// Currently trying to print the string "I was born in Bolton" but it isn't working...
2
// what's the error ?
3
+// It's shows the reference error because variables should be declared first then the console.log().
4
+// console.log(`I was born in ${cityOfBirth}`);
5
+// const cityOfBirth = "Bolton";
6
+/*we need to put declare variables(const cityOfBirth = "Bolton";) in first line in second line we use used console.log to print the output*/
7
const cityOfBirth = "Bolton";
-
-console.log(`I was born in ${cityOfBirth}`);
-/*we need to put declare variables(const cityOfBirth = "Bolton";) in first line in second line we use used console.log to print the output*/
8
+console.log(`I was born in ${cityOfBirth}`);
0 commit comments