Skip to content

Commit e544bc8

Browse files
committed
Changed age variable declaration from const to let to allow reassignment
1 parent fe0fccc commit e544bc8

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

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

3-
const age = 33;
3+
let age = 33;
44
age = age + 1;
5+
// use let instead of const to declare the age variable, as const variables cannot be reassigned.

0 commit comments

Comments
 (0)