You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Currently trying to print the string "I was born in Bolton" but it isn't working...
2
2
// what's the error ?
3
3
4
-
console.log(`I was born in ${cityOfBirth}`);
5
4
constcityOfBirth="Bolton";
5
+
console.log(`I was born in ${cityOfBirth}`);
6
+
7
+
// The error happens because cityOfBirth is used before it is defined. JavaScript runs code from top to bottom, so the variable must be declared first.
0 commit comments