Skip to content

Commit aa7d600

Browse files
committed
Answer to 2-mandatory-errors/1.js included as text
1 parent d9ecdf5 commit aa7d600

File tree

1 file changed

+1
-0
lines changed
  • Sprint-1/2-mandatory-errors

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
const age = 33;
44
age = age + 1;
5+
//problem: we cannot reassign a value to a variable that has been declared with "const". We can solve this problem by changing the declaration of the variable from "const" to "let", which allows us to reassign values to the variable. So we would change the first line to "let age = 33;".

0 commit comments

Comments
 (0)