Skip to content

Commit 911c437

Browse files
author
kohanman
committed
Sprint 1 coursework 2.1: change const to let
1 parent 88cba96 commit 911c437

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+
//age is a constant variable so cannot be reassigned, can use let instead of const to fix this error

0 commit comments

Comments
 (0)