Skip to content

Commit b45b87d

Browse files
committed
I identified the error and corrected it
1 parent 14184ec commit b45b87d

File tree

1 file changed

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

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,11 @@
33

44
console.log(`I was born in ${cityOfBirth}`);
55
const cityOfBirth = "Bolton";
6+
7+
// The error is that the variable cityOfBirth isn't declared and assigned a value.
8+
// To fix the error, we need to declare and assign a value to cityOfBirth before using it in the console.log statement.
9+
10+
// The corrected code is below:
11+
12+
const cityOfBirth = "Bolton";
13+
console.log(`I was born in ${cityOfBirth}`);

0 commit comments

Comments
 (0)