Skip to content

Commit 2d0acdc

Browse files
debug2604debug2604
authored andcommitted
Add specific error names to 2.js; clarify let vs const in 2.s
1 parent 71e9cc8 commit 2d0acdc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • Sprint-2/2-mandatory-errors

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ console.log(`I was born in ${cityOfBirth}`);
88
//console.log(`I was born in ${cityOfBirth}`);
99
//const cityOfBirth = "Bolton";
1010
//The error is that the variable should be declared as a constant before it is used in the console.log statement.
11+
12+
//This is a ReferenceError.
13+
//In this code, the key word does not need to be constant, it can be let - if this is the case the variable city0fBirth can be reassigned in other lines - instead of constant (which cannot reassign variable).

0 commit comments

Comments
 (0)