Skip to content

Commit f80c15b

Browse files
committed
task 1.js explained
1 parent 509ff84 commit f80c15b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • Sprint-2/2-mandatory-errors

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22

33
let age = 33;
44
age = age + 1;
5-
console.log(age);
5+
console.log(age);
6+
7+
// This code returns a "TypeError: Assignment to constant variable.", because the variable age has been made constant and can't be manipulated.
8+
// To solve the problem, we have to reassign the age variable from "const" to "let", that way it will allow for further manipulation and solve the error.

0 commit comments

Comments
 (0)