Skip to content

Commit 1de07dc

Browse files
authored
Update 2.js
1 parent ab26b8e commit 1de07dc

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • Sprint-1/2-mandatory-errors

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

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

44
console.log(`I was born in ${cityOfBirth}`);
55
const cityOfBirth = "Bolton";
6+
//ANSWER:
7+
// The 'cityOfBirth' was not assigned before the console.log statement
8+
// Solution will be to switch the lines as shown below:
9+
10+
11+
const cityOfBirth = "Bolton";
12+
console.log(`I was born in ${cityOfBirth}`);

0 commit comments

Comments
 (0)