Skip to content

Commit d0a5241

Browse files
in random erros .2 I explained why the code doesn't work and changed the const varible place to be before the console function line.
1 parent 2515a68 commit d0a5241

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +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-
4-
console.log(`I was born in ${cityOfBirth}`);
53
const cityOfBirth = "Bolton";
4+
console.log(`I was born in ${cityOfBirth}`);
5+
66
Because the const varibale is decalred after it is used in the console={.log} statement and it should be decalred befor to be executed.

0 commit comments

Comments
 (0)