From 4160c1a546cfce78314027169f979e9146714649 Mon Sep 17 00:00:00 2001 From: Asanda Date: Sat, 26 Sep 2026 16:58:06 +0200 Subject: [PATCH] Sprint 2 --- Sprint-2/2-mandatory-errors/0.js | 4 ++-- Sprint-2/2-mandatory-errors/1.js | 2 +- Sprint-2/2-mandatory-errors/2.js | 2 +- Sprint-2/2-mandatory-errors/3.js | 3 ++- Sprint-2/2-mandatory-errors/4.js | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Sprint-2/2-mandatory-errors/0.js b/Sprint-2/2-mandatory-errors/0.js index cf6c5039f..6a7a7f690 100644 --- a/Sprint-2/2-mandatory-errors/0.js +++ b/Sprint-2/2-mandatory-errors/0.js @@ -1,2 +1,2 @@ -This is just an instruction for the first activity - but it is just for human consumption -We don't want the computer to run these 2 lines - how can we solve this problem? \ No newline at end of file +// This is just an instruction for the first activity - but it is just for human consumption +// We don't want the computer to run these 2 lines - how can we solve this problem? \ No newline at end of file diff --git a/Sprint-2/2-mandatory-errors/1.js b/Sprint-2/2-mandatory-errors/1.js index 7a43cbea7..031839b47 100644 --- a/Sprint-2/2-mandatory-errors/1.js +++ b/Sprint-2/2-mandatory-errors/1.js @@ -1,4 +1,4 @@ // trying to create an age variable and then reassign the value by 1 -const age = 33; +let age = 33; age = age + 1; diff --git a/Sprint-2/2-mandatory-errors/2.js b/Sprint-2/2-mandatory-errors/2.js index e09b89831..a7401245d 100644 --- a/Sprint-2/2-mandatory-errors/2.js +++ b/Sprint-2/2-mandatory-errors/2.js @@ -1,5 +1,5 @@ // Currently trying to print the string "I was born in Bolton" but it isn't working... // what's the error ? -console.log(`I was born in ${cityOfBirth}`); const cityOfBirth = "Bolton"; +console.log(`I was born in ${cityOfBirth}`); \ No newline at end of file diff --git a/Sprint-2/2-mandatory-errors/3.js b/Sprint-2/2-mandatory-errors/3.js index ec101884d..e56fd69fa 100644 --- a/Sprint-2/2-mandatory-errors/3.js +++ b/Sprint-2/2-mandatory-errors/3.js @@ -1,5 +1,6 @@ -const cardNumber = 4533787178994213; +const cardNumber = "4533787178994213"; const last4Digits = cardNumber.slice(-4); +console.log(last4Digits); // The last4Digits variable should store the last 4 digits of cardNumber // However, the code isn't working diff --git a/Sprint-2/2-mandatory-errors/4.js b/Sprint-2/2-mandatory-errors/4.js index 5f86c730b..e99aa3664 100644 --- a/Sprint-2/2-mandatory-errors/4.js +++ b/Sprint-2/2-mandatory-errors/4.js @@ -1,2 +1,2 @@ -const 12HourClockTime = "8:53pm"; -const 24hourClockTime = "20:53"; +const twelve_HourClockTime = "8:53pm"; +const twenty_four_hourClockTime = "20:53";