Skip to content

Commit 3ff94aa

Browse files
committed
Fix age variable reassignment
1 parent 8191573 commit 3ff94aa

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • Sprint-2/2-mandatory-errors

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

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

3-
const age = 33;
3+
//const age = 33;
4+
//age = age + 1;
5+
6+
// We use let because the value of age needs to change.
7+
8+
9+
let age = 33;
10+
411
age = age + 1;
12+
console.log(age);

0 commit comments

Comments
 (0)