File tree Expand file tree Collapse file tree 5 files changed +5
-1
lines changed
Sprint-1/2-mandatory-errors Expand file tree Collapse file tree 5 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1+
12//This is just an instruction for the first activity - but it is just for human consumption
23//We don't want the computer to run these 2 lines - how can we solve this problem?
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+
34let age = 33 ;
45age = age + 1 ;
56console . log ( age )
Original file line number Diff line number Diff line change 11// Currently trying to print the string "I was born in Bolton" but it isn't working...
22// what's the error ?
33
4-
54const cityOfBirth = "Bolton" ;
65console . log ( `I was born in ${ cityOfBirth } ` ) ;
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const last4Digits = cardNumber.slice(-4);
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
1010
11+
1112//Answer
1213
1314// This code is not working because slice() is working with "string" or "arrays" but not with numbers. and cardNumber is a number.
@@ -17,3 +18,4 @@ const last4Digits = cardNumber.slice(-4);
1718const cardNumber = 4533787178994213 ;
1819const last4Digits = String ( cardNumber ) . slice ( - 4 ) ;
1920console . log ( last4Digits )
21+
Original file line number Diff line number Diff line change 11const 12 HourClockTime = "20:53" ;
2+
23const 24 hourClockTime = "08:53" ;
34// the 12 and 24 are changing position
45const 24 HourClockTime = "20:53" ;
You can’t perform that action at this time.
0 commit comments