Skip to content

Commit 5cf1cfd

Browse files
authored
Update 2.js
Declare variable before using in template string.
1 parent 5e31d7c commit 5cf1cfd

File tree

1 file changed

+1
-1
lines changed
  • Sprint-1/2-mandatory-errors

1 file changed

+1
-1
lines changed

Sprint-1/2-mandatory-errors/2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Currently trying to print the string "I was born in Bolton" but it isn't working...
2-
// what's the error ?
2+
// what's the error ? The error here is due to using a variable before it's declared.
33

44
console.log(`I was born in ${cityOfBirth}`);
55
const cityOfBirth = "Bolton";

0 commit comments

Comments
 (0)