Skip to content

Commit 55aaa5f

Browse files
solve exec. sprint-1/2-mandatory-errors/2.js
1 parent 04cb872 commit 55aaa5f

File tree

1 file changed

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

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
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}`);
54
const cityOfBirth = "Bolton";
5+
console.log(`I was born in ${cityOfBirth}`);
6+
7+
//it's not working because variable cityOfBirth was not defined.
8+
//change the position of -- const cityOfBirth = "Bolton"; -- before the logging will fix the problem

0 commit comments

Comments
 (0)