Skip to content

Commit 6f3c7bb

Browse files
solving exercise 2.js
1 parent dc92e00 commit 6f3c7bb

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • Sprint-2/2-mandatory-errors

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
// Currently trying to print the string "I was born in Bolton" but it isn't working...
22
// what's the error ?
33

4-
console.log(`I was born in ${cityOfBirth}`);
4+
//Answer : the error was that CitOfBirth vaiable was declared after the method cosole .log()
5+
//The solution is to declare it before calling it.
6+
57
const cityOfBirth = "Bolton";
8+
9+
console.log(`I was born in ${cityOfBirth}`);
10+

0 commit comments

Comments
 (0)