Skip to content

Commit ac11085

Browse files
committed
completed task in Sprint-1/2-mandatory-errors/1.js
1 parent ceb26e8 commit ac11085

File tree

1 file changed

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

1 file changed

+8
-2
lines changed

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

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

3-
const age = 33;
4-
age = age + 1;
3+
// const age = 33;
4+
// age = age + 1;
5+
6+
// using let as opposed to const is appropriate here as we intend to reassign the value of age
7+
8+
let age = 33
9+
age += 1
10+
console.log(age) //should log 34;

0 commit comments

Comments
 (0)