Skip to content

London | May-2026-itp | Chun Yan Wong | Sprint 3 | Alarm clock - #1369

Open
cywong-dev wants to merge 6 commits into
CodeYourFuture:mainfrom
cywong-dev:alarmclock
Open

London | May-2026-itp | Chun Yan Wong | Sprint 3 | Alarm clock#1369
cywong-dev wants to merge 6 commits into
CodeYourFuture:mainfrom
cywong-dev:alarmclock

Conversation

@cywong-dev

Copy link
Copy Markdown

Learners, PR Template

Self checklist

[X] I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
[X] My changes meet the requirements of the task
[X] I have tested my changes
[X] My changes follow the style guide

Changelist

The PR shows the solution for the Sprint3 - AlarmClock

@cywong-dev cywong-dev added 📅 Sprint 3 Assigned during Sprint 3 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 3, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is quite solid.

Comment thread Sprint-3/alarmclock/alarmclock.js Outdated
Comment thread Sprint-3/alarmclock/alarmclock.js Outdated
Comment thread Sprint-3/alarmclock/alarmclock.js
Comment thread Sprint-3/alarmclock/alarmclock.js
Comment thread Sprint-3/alarmclock/alarmclock.js Outdated
@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 8, 2026
Initialize timeRemainingElement and assign it to the DOM element.
Declare timeRemainingElement variable at the top for better scope management.
Removed commented-out alarm functions and setup code.
@cywong-dev cywong-dev added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Aug 9, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. Well done.

function setAlarm() {}
let countdownInterval = null;
let flashInterval = null;
let timeRemainingElement = null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to declare timeRemainingElement and initialise it as

const timeRemainingElement = document.getElementById("timeRemaining");
  • Declaring it as const is safer.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants