Skip to content

Commit 81e5bf5

Browse files
committed
updated to correct code error
1 parent 19900cf commit 81e5bf5

File tree

1 file changed

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

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// trying to create an age variable and then reassign the value by 1
22

3-
const age = 33;
4-
age = age + 1;
3+
let age = 33; //changing const to let allows reassignment.
4+
age = age + 1; //age is now 34
5+
6+
console.log(age); //This line was added just to test the expression. Returns 34.

0 commit comments

Comments
 (0)