Skip to content

Commit adbf420

Browse files
Alex JamshidiAlex Jamshidi
authored andcommitted
solution to 1.js added
1 parent 4003837 commit adbf420

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • Sprint-1/2-mandatory-errors

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22

33
const age = 33;
44
age = age + 1;
5+
6+
// The error is TypeError: Assignment to constant variable.
7+
// This is occurring as a constant variable cannot be reassigned
8+
// line 4 is trying to reassign the constant variable age
9+
// This could be navigated by using let instead of const, or assigning a new variable name for age + 1

0 commit comments

Comments
 (0)