Skip to content

Manchester | 26-ITP-jan | Liban Jama | Sprint 3 | Alarm Clock#1075

Open
libanj0161 wants to merge 5 commits intoCodeYourFuture:mainfrom
libanj0161:alarm.clock
Open

Manchester | 26-ITP-jan | Liban Jama | Sprint 3 | Alarm Clock#1075
libanj0161 wants to merge 5 commits intoCodeYourFuture:mainfrom
libanj0161:alarm.clock

Conversation

@libanj0161
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 Alarm Clock App

Questions

N/A.

@libanj0161 libanj0161 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 Mar 23, 2026
@Luro91 Luro91 added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Apr 4, 2026
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 alarm clock looks really nice now. Good job

Comment on lines +15 to +19
<div class="button-group">
<button id="set" type="button">Set Alarm</button>
<button id="stop" type="button">Stop Alarm</button>
</div>
</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How can you format the code to indicate more clearly the hierachy of HTML elements (what is a children of what)

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.

formatting fixed

}

function setAlarm() {
let seconds = parseInt(document.getElementById("alarmSet").value);
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 when the user enters a negative number or a string value?

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.

Updated to throw an error


function setAlarm() {
let seconds = parseInt(document.getElementById("alarmSet").value);
clearInterval(countdown);
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 clearing of the interval to ensure only one countdown is running at all times

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.

thank you


if (seconds <= 0) {
clearInterval(countdown);
document.body.classList.add("alarm-finished")
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 completion of the bonus task

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.

thanks

@Luro91 Luro91 added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Apr 4, 2026
@libanj0161 libanj0161 requested a review from Luro91 April 5, 2026 15:59
@libanj0161 libanj0161 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 5, 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. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 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