File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Sprint-1/2-mandatory-errors Expand file tree Collapse file tree 2 files changed +11
-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+ */
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; // redeclaring with a let or var solves this error
4+ /* variables declared with `const` in JavaScript cannot be reassigned.
5+ However, if the `const` variable is an object or array,
6+ its contents can still be changed (the reference is immutable, not the value).
7+ */
8+ let age = 33 ;
49age = age + 1 ;
10+
11+ console . log ( age ) ;
You can’t perform that action at this time.
0 commit comments