Skip to content

Commit 1b0b5b3

Browse files
committed
I've changed const to let for age variable to allow reassignment
1 parent 6a8fc1c commit 1b0b5b3

File tree

1 file changed

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

1 file changed

+4
-3
lines changed

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

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

3-
let age = 33;
4-
age = age + 1;
3+
let age = 33; // Declare a variable called age and assign it the value 33
4+
age = age + 1; // Reassign age to be its current value plus 1
5+
console.log(age); // Output: 34

0 commit comments

Comments
 (0)