Skip to content

Glasgow | 26-ITP-May | Niangh Ciang | Sprint 3 | Alarm Clock - #1273

Open
Niangh-Ciang wants to merge 4 commits into
CodeYourFuture:mainfrom
Niangh-Ciang:alarmclock
Open

Glasgow | 26-ITP-May | Niangh Ciang | Sprint 3 | Alarm Clock#1273
Niangh-Ciang wants to merge 4 commits into
CodeYourFuture:mainfrom
Niangh-Ciang:alarmclock

Conversation

@Niangh-Ciang

Copy link
Copy Markdown

Self checklist

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

Changelist

Completed full implementation in alarmclock.js.

@Niangh-Ciang Niangh-Ciang 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. Module-Data-Groups The name of the module. labels Jul 21, 2026
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jul 27, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good start, but there are a couple of things you need to check again

@@ -1,4 +1,23 @@
function setAlarm() {}
function setAlarm() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Have you properly handled input validation?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I’ve added input validation so the alarm will show a message when no time is set or when the time is zero or negative.

Comment thread Sprint-3/alarmclock/alarmclock.js Outdated
const timeRemainingDisplay = document.getElementById("timeRemaining");

timeRemainingDisplay.innerText = `Time Remaining: ${formatTime(remainingTime)}`;
const countdownInterval = setInterval(() => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What happens if there is already an alarm countdown happening and you start another one?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

If a countdown is already running and I start a new one, the old countdown doesn’t stop. This makes the timer behave incorrectly sometimes it goes faster or skips numbers because two countdowns are running at the same time.

@LonMcGregor LonMcGregor 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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Data-Groups The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants