Skip to content

London | ITP-Jan-26 | Maryanne Mosonik | Sprint 3 | Alarm Clock#1091

Open
Maryanne-K wants to merge 1 commit intoCodeYourFuture:mainfrom
Maryanne-K:Alarm_Clock_App
Open

London | ITP-Jan-26 | Maryanne Mosonik | Sprint 3 | Alarm Clock#1091
Maryanne-K wants to merge 1 commit intoCodeYourFuture:mainfrom
Maryanne-K:Alarm_Clock_App

Conversation

@Maryanne-K
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

This is Sprint 3 backlog on building an alarm clock.

@Maryanne-K Maryanne-K marked this pull request as ready for review March 24, 2026 22:03
@Maryanne-K Maryanne-K added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 24, 2026
@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 Apr 4, 2026
function setAlarm() {
const input = document.getElementById("alarmSet");
const seconds = parseInt(input.value, 10);
if (isNaN(seconds) || seconds <= 0) return;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice validation of the user input. Its important to always validate the user data.

How could you inform the user about that the input is invalid?

Comment on lines +4 to +6
function setAlarm() {
const input = document.getElementById("alarmSet");
const seconds = parseInt(input.value, 10);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The intentadion of the code seems incorrect. How can you ensure that the format is always consistent based on agreed rules?


if (remainingTime <= 0) {
clearInterval(countdown);
if (typeof playAlarm === "function") {
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 do you need to check if playAlarm is a function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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