Skip to content

London | 26-ITP-May | Zadri Abdule | Sprint 3 | alarm-clock app - #1319

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

London | 26-ITP-May | Zadri Abdule | Sprint 3 | alarm-clock app#1319
Zadri415 wants to merge 2 commits into
CodeYourFuture:mainfrom
Zadri415:sprint-3-alarmclock

Conversation

@Zadri415

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

Completed sprint 3 alarm - clock app task.

@Zadri415 Zadri415 added 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 28, 2026
let seconds = parseInt(input.value, 10);
if (!Number.isFinite(seconds) || seconds < 0) seconds = 0;

function formatMMSS(s) {

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 job putting the code for formatting into an own function. This makes it reusable and easier to change the formtting if needed


heading.innerText = formatMMSS(seconds);

if (window._alarmIntervalId) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why are you adding _alarmIntervalId to the window object?

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

let seconds = parseInt(input.value, 10);
if (!Number.isFinite(seconds) || seconds < 0) seconds = 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I am not sure if the expected user behaviour for invalid inputs is to set the seconds to 0. What else could you do instead?

@Luro91 Luro91 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 Jul 30, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants