Skip to content

Sheffield | 26-ITP-Jan | Mona-Eltantawy | Sprint 3| Alarm clock#1158

Open
Mona-Eltantawy wants to merge 7 commits intoCodeYourFuture:mainfrom
Mona-Eltantawy:alarm-clock
Open

Sheffield | 26-ITP-Jan | Mona-Eltantawy | Sprint 3| Alarm clock#1158
Mona-Eltantawy wants to merge 7 commits intoCodeYourFuture:mainfrom
Mona-Eltantawy:alarm-clock

Conversation

@Mona-Eltantawy
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

… instead of number

- in the js file i implemented functions to set the alarm to count the remaining time and play the alarm sound when it counts to 0 .
@Mona-Eltantawy Mona-Eltantawy added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 1, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 1, 2026
@github-actions

This comment has been minimized.

@Mona-Eltantawy Mona-Eltantawy added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 1, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 1, 2026
@Mona-Eltantawy Mona-Eltantawy added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 3, 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 html title should say "Alarm clock app"

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.

done

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 meant the title that is responsible for what is shown in the tab in the browser header. How can you change this?

Screenshot from 2026-04-15 06-56-11

function setAlarm() {}
var audio = new Audio("alarmsound.mp3");

// DO NOT EDIT BELOW HERE
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 think your code should be above this line

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 changed the whole page multiple times so I don't have the line now

Comment thread Sprint-3/alarmclock/alarmclock.js Outdated
Comment on lines +11 to +12
if (isNaN(timeRemaining) || timeRemaining <= 0) {
alert("Please enter a valid number greater than 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.

Nice error handling. It's important to validate user input

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 changed the alert to console.error.
not sure if it's right or not.

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 did not intent to request a change here. It was already good. The advantage of the alert is that it is more visible to the user. For the first exercises I think alerts and console.error logs are both fine.


function pauseAlarm() {
audio.pause();
audio.currentTime = 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.

Nice that you reset the audio time here

@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
@Mona-Eltantawy Mona-Eltantawy added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 14, 2026
@Luro91 Luro91 removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 15, 2026
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