File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed
Sprint-1/2-mandatory-errors Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 22
33let age = 33 ;
44age = age + 1 ;
5+
6+ // The value of 'let' variable can be reassigned not the value of 'const';
Original file line number Diff line number Diff line change 33
44const cityOfBirth = "Bolton" ;
55console . log ( `I was born in ${ cityOfBirth } ` ) ;
6+
7+ // The first first needs to be initialised then it will be accessed;
Original file line number Diff line number Diff line change 11const cardNumber = 4533787178994213 ;
22// const last4Digits = cardNumber.slice(-4);
33
4+ // slice() method cannot work on numbers.
5+ // I changed the numbers to string and then implemented the slice() method
46const last4Digits = cardNumber . toString ( ) . slice ( - 4 ) ;
57
68// The last4Digits variable should store the last 4 digits of cardNumber
You can’t perform that action at this time.
0 commit comments