Skip to content

Commit a4b365b

Browse files
explained why we can't reassign a variable when using "const"
1 parent f6b6842 commit a4b365b

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22

33
const age = 33;
44
age = age + 1;
5+
//the "age" variable has been declared with a const and already assigned a value and it can not
6+
// be reassigned another value because of the "const"

0 commit comments

Comments
 (0)