Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c9145df
CalculateMedian function implemented
Jul 16, 2026
1cf01db
Comment updated on return null
Jul 16, 2026
256ef50
Function calculateMedian updated so it could calculate even elements …
Jul 16, 2026
84b5c1e
.houseNumber added in order to the house number to be printed.
Jul 18, 2026
51f62a2
Author object for of loop changed into for in tp print al the values …
Jul 19, 2026
ae0b900
Recipe object literal fixed so it can prints the ingredients on new l…
Jul 19, 2026
702b5ba
A fifth element removed from ingredients array which was unneeded
Jul 23, 2026
583bb2c
Tests created for all cases.
Jul 24, 2026
c0f9787
function implemented for checking property exist in an object.
Jul 24, 2026
552c68c
Initial test case created
Jul 24, 2026
9058a37
Function implemented for creating an abject from key-value array.
Jul 24, 2026
ce06e18
Spelling mistakes and bug in CA key fixed. Test passes.
Jul 24, 2026
e6267ac
Missing return obj added.
Jul 24, 2026
14c848c
Commented unneeded code deleted.
Jul 24, 2026
c66861d
First test values containing = tested
Jul 25, 2026
c4dec19
the for loop for testing values containing = fixed
Jul 25, 2026
d5c28aa
If !pair added for checking empty strings.
Jul 25, 2026
b10058d
decodeURLComponent function used to decode percent-encoded characters…
Jul 25, 2026
7fc4886
Using a regular expression .replace(/\+/g, " ") the + sign is remove…
Jul 25, 2026
946461b
Last test commented out
Jul 25, 2026
37e70cb
Test created for all the cases
Jul 25, 2026
1b4063a
function implemented for checking duplicate items.
Jul 25, 2026
af59161
for the last test for invalid input test adjusted so jest can check f…
Jul 25, 2026
0877d2d
if statement added to check the item is number not string.
Jul 25, 2026
ab84c24
the tittle element changed into Quote generator app"
Jul 26, 2026
57bcdde
showRandomQuote function implemented to display randomised quote upon…
Jul 26, 2026
6100dc9
showRandomQuote function implemented to display randomised quote upon…
Jul 26, 2026
1ca1d5e
hello there changed to welcome on h1 element
Jul 26, 2026
1547e5b
Simple changes made to the styling
Jul 26, 2026
e72732e
"Delete completed tasks" button added.
Jul 29, 2026
f997781
Delete completed function started being implemented
Jul 29, 2026
d674f5c
comment added
Jul 29, 2026
81f7863
Title element updated to 'Alarm clock app'
Aug 3, 2026
27fa3e9
Time and heading variables declared.
Aug 3, 2026
e0849c0
Minutes and seconds declared. heading.innerText changed to include re…
Aug 4, 2026
e16e1b0
setIntervals timer started. Minutes and seconds recalculated again.
Aug 4, 2026
6e2d741
if condition for checking count down is zero. Then paly the alarm and…
Aug 4, 2026
b7754d4
Errors fixed
Aug 4, 2026
7ea21cf
Typos and errors in the code corrected.
Aug 4, 2026
a9865b0
Restore files accidentally removed from branch
Aug 4, 2026
43fcdea
Remove files that don't belong in this PR
Aug 4, 2026
24e00dc
Remove package.json from tracking, keep locally
Aug 4, 2026
f3c7417
Ignore local package.json
Aug 4, 2026
3cddd7d
Remove unnecessary root package.json
Aug 4, 2026
0497772
Revert .gitignore change
Aug 4, 2026
c1f876a
Restore package.json to match main
Aug 4, 2026
3dbc4ad
Minor formatting touch
Aug 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion Sprint-3/alarmclock/alarmclock.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
function setAlarm() {}
function setAlarm() {
let time = Number(document.getElementById("alarmSet").value);

let heading = document.getElementById("timeRemaining");

let minutes = Math.floor(time / 60);
let seconds = time % 60;

heading.innerText =
"Time Remaining: " +
String(minutes).padStart(2, "0") +
":" +
String(seconds).padStart(2, "0");

let timer = setInterval(function () {
time = time - 1;

let minutes = Math.floor(time / 60);
let seconds = time % 60;

heading.innerText =
"Time Remaining: " +
String(minutes).padStart(2, "0") +
":" +
String(seconds).padStart(2, "0");

if (time === 0) {
playAlarm();
clearInterval(timer);
}
}, 1000);
}

// DO NOT EDIT BELOW HERE

Expand Down
1 change: 1 addition & 0 deletions Sprint-3/alarmclock/alarmclock.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ test("should play audio when the timer reaches zero", () => {

expect(mockPlayAlarm).toHaveBeenCalledTimes(1);
});

2 changes: 1 addition & 1 deletion Sprint-3/alarmclock/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>Title here</title>
<title>Alarm clock app</title>
</head>
<body>
<div class="centre">
Expand Down
1 change: 1 addition & 0 deletions Sprint-3/alarmclock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
},
"homepage": "https://github.com/CodeYourFuture/CYF-Coursework-Template#readme"
}

1 change: 1 addition & 0 deletions Sprint-3/alarmclock/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ If you have time and want to do more why not try
- Make the background change color when the alarm clock finishes
- Try making the background flash!
- Could you add `pause` functionality so that the count down stops and then you restart it later?

1 change: 1 addition & 0 deletions Sprint-3/alarmclock/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
h1 {
text-align: center;
}

Loading