Skip to content

Commit 2d3769c

Browse files
authored
Fix TypeError by changing const to let for age
Corrected the reassignment of a constant variable in the code.
1 parent c2075ba commit 2d3769c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Sprint-2/2-mandatory-errors

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// trying to create an age variable and then reassign the value by 1
2-
2+
// the vatriable age was declared as a const variable and trying to assigne another value caused a TypeError: Assignment to constant variable.
33
let age = 33;
44
age = age + 1;
55
console.log(age)

0 commit comments

Comments
 (0)