Skip to content

Commit 2f51f5b

Browse files
committed
Replaced the word Const line to Const Variable on 9.
1 parent 567e88f commit 2f51f5b

File tree

1 file changed

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

1 file changed

+2
-3
lines changed

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

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

4-
54
console.log(`I was born in ${cityOfBirth}`);
65
const cityOfBirth = "Bolton";
76

87
// Reference error:can not access "cityOfBirth" before initialization
9-
// in this code the variable "cityOfBirth" is used before it is been declared"
10-
// solution: Move the const line above the console.log
8+
// in this code the variable "cityOfBirth" is used before it is been declared"
9+
// solution: Move the const variable above the console.log

0 commit comments

Comments
 (0)