Skip to content

Manchester | 26-ITP-May | Abdu Hassen | Sprint 3 | Alarm Clock - #1334

Open
Abduhasen wants to merge 2 commits into
CodeYourFuture:mainfrom
Abduhasen:alarmclock-sprint-3-backlog
Open

Manchester | 26-ITP-May | Abdu Hassen | Sprint 3 | Alarm Clock#1334
Abduhasen wants to merge 2 commits into
CodeYourFuture:mainfrom
Abduhasen:alarmclock-sprint-3-backlog

Conversation

@Abduhasen

Copy link
Copy Markdown

Learners, PR Template

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

-wrote a function that takes positive number,set alarm,count down,play alarm at specific time

Questions

N/A

@Abduhasen Abduhasen 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 29, 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.

What application states should be reset before starting a new countdown to ensure consistent behaviour between runs?

Note: a user may not click the "Stop" button first before starting a new count down.

Comment on lines +4 to +9
const userInput = document.querySelector("#alarmSet").value;
let timeRemaining = Number(userInput);
if (isNaN(timeRemaining) || timeRemaining <= 0) {
alert("Please enter a valid number.");
return;
}

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.

Some input values that can make your app behave abnormally can still pass this check. Can you strengthen the check?

Comment thread Sprint-3/alarmclock/alarmclock.js
@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 3, 2026
@Abduhasen Abduhasen 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 5, 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.

Comment on lines +8 to +10
isNaN(timeRemaining) ||
timeRemaining <= 0 ||
!Number.isInteger(timeRemaining)

@cjyuan cjyuan Aug 5, 2026

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.

You could probably remove one of these checks as it is redundant.

@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 5, 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. Module-Data-Groups The name of the module. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants