File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Sprint-1/2-mandatory-errors Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1- This is just an instruction for the first activity - but it is just for human consumption
2- We don 't want the computer to run these 2 lines - how can we solve this problem?
1+ // This is just an instruction for the first activity - but it is just for human consumption
2+ // We don't want the computer to run these 2 lines - how can we solve this problem?
3+ // by simply commenting out the lines with // the computer will ignore these lines and not run them
Original file line number Diff line number Diff line change 11// trying to create an age variable and then reassign the value by 1
22
3- const age = 33 ;
3+ // const age = 33;
4+ // age = age + 1;
5+
6+ // this code will throw an error because age is declared as a constant and we cannot reassign a new value to a constant variable
7+
8+ // To fix this error, we can change the declaration of age from const to let
9+
10+ let age = 33 ;
411age = age + 1 ;
12+
13+ // Now the code will work without throwing an error, and the value of age will be updated to 34.
You can’t perform that action at this time.
0 commit comments