File tree Expand file tree Collapse file tree 4 files changed +10
-1
lines changed
Sprint-1/2-mandatory-errors Expand file tree Collapse file tree 4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 22
33let age = 33 ;
44age = age + 1 ;
5+
6+ // You cannot mutate a constant so you need to change it to a variable where mutation is permitted
Original file line number Diff line number Diff line change 33
44const cityOfBirth = "Bolton" ;
55console . log ( `I was born in ${ cityOfBirth } ` ) ;
6+
7+ // The order of the code matters, the constant needs to be defined first before it can be used
Original file line number Diff line number Diff line change @@ -7,3 +7,6 @@ const last4Digits = `${cardNumber}`.slice(-4)
77// Then run the code and see what error it gives.
88// Consider: Why does it give this error? Is this what I predicted? If not, what's different?
99// Then try updating the expression last4Digits is assigned to, in order to get the correct value
10+
11+ // slice() function only work on String type and not on Number type.
12+ // So, convert the Number type into a String type in order to use slice() function
Original file line number Diff line number Diff line change 11const _12HourClockTime = "20:53" ;
2- const _24hourClockTime = "08:53" ;
2+ const _24hourClockTime = "08:53" ;
3+
4+ // Variables and constants name cannot begin with a number but can include number later on
You can’t perform that action at this time.
0 commit comments