Skip to content

Commit aedf01f

Browse files
committed
declared variable before using it in console.log in 2.js
1 parent 9d258a6 commit aedf01f

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Currently trying to print the string "I was born in Bolton" but it isn't working...
22
// what's the error ?
3+
// The variable should be declared before it is used in console.log
34

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

0 commit comments

Comments
 (0)