Skip to content

Commit 6fa81f6

Browse files
committed
Finished all 4 mandatory errors tasks
1 parent 3aed680 commit 6fa81f6

5 files changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
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?
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// trying to create an age variable and then reassign the value by 1
2+
3+
const age = 33;
4+
age = age + 1;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Currently trying to print the string "I was born in Bolton" but it isn't working...
2+
// what's the error ?
3+
4+
console.log(`I was born in ${cityOfBirth}`);
5+
const cityOfBirth = "Bolton";
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const cardNumber = 4533787178994213;
2+
const last4Digits = cardNumber.slice(-4);
3+
4+
// The last4Digits variable should store the last 4 digits of cardNumber
5+
// However, the code isn't working
6+
// Before running the code, make and explain a prediction about why the code won't work
7+
// Then run the code and see what error it gives.
8+
// Consider: Why does it give this error? Is this what I predicted? If not, what's different?
9+
// Then try updating the expression last4Digits is assigned to, in order to get the correct value
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const 12HourClockTime = "8:53pm";
2+
const 24hourClockTime = "20:53";

0 commit comments

Comments
 (0)