Skip to content

Commit 04de5cb

Browse files
committed
Error for 2.js is ReferenceError and gave suggestion
Error for 3.js is TypeError and added code that would run it.
1 parent 4c7f5d9 commit 04de5cb

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • Sprint-2/2-mandatory-errors

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +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}`);
5-
// const cityOfBirth = "Bolton";
4+
console.log(`I was born in ${cityOfBirth}`);
5+
const cityOfBirth = "Bolton";
66

7-
//ReferenceError is happening
7+
//ReferenceError is happening as the const is after the console.log request for it, so the order is wrong.
88

9-
const cityOfBirth = "Bolton";
10-
console.log(`I was born in ${cityOfBirth}`);
9+
// const cityOfBirth = "Bolton";
10+
// console.log(`I was born in ${cityOfBirth}`);

0 commit comments

Comments
 (0)