Skip to content

Commit 0600c9f

Browse files
committed
2.js
1 parent c76b3f4 commit 0600c9f

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 cityOfBirth is being used before it's declared. To fix the error, we need to declare the variable before using it in the console.log statement.
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)