Skip to content

Commit 8b85d0f

Browse files
committed
Explained the error message in 1.js
1 parent 7002d6b commit 8b85d0f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • Sprint-2/2-mandatory-errors

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
let age = 33;
44
age = age + 1;
55

6-
// Answer: I changed the const to let, so the variable age becomes reassignable
6+
// Answer: I got the error message TypeError: Assignment to constant variable.
7+
// That is because age was declared using const, which makes it non-reassignable.
8+
// I changed the const to let, so the variable age becomes reassignable

0 commit comments

Comments
 (0)