Skip to content

Conversation

@CatchingKiyoko
Copy link

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

added and implemented lines of code and refactored
ensured that errors throw NaN for when its not a number.

@CatchingKiyoko CatchingKiyoko added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 3 Assigned during Sprint 3 of this module Module-Data-Groups The name of the module. labels Nov 19, 2025
Copy link

@bp7968h bp7968h left a comment

Choose a reason for hiding this comment

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

Reviewed

Overall, this is definitely a good work. The alarm functionality works well, and your code is readable with clear variable names and helpful comments.

I've left a couple of questions in the code about:

  1. A bug that occurs when setting multiple alarms
  2. How to improve readability with magic numbers

Take a look at those comments and let me know what you think. Try to reproduce the bug and see if you can figure out why it happens before checking the solutions.

} else {
updatedTime();
}
}, 1000); // updates the function by running it every 1000ms
Copy link

Choose a reason for hiding this comment

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

Here, 1000 is what we call a magic number (a value whose meaning isn't immediately obvious). How could you make this number's purpose clearer to someone reading your code?

@@ -1,4 +1,50 @@
function setAlarm() {}
function setAlarm() {
Copy link

Choose a reason for hiding this comment

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

There is a bug in your program, suppose the user clicks on the Set Alarm button while the previous alarm is running.

  • Why does that happen?
  • How would you resolve this?

@bp7968h bp7968h 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 Nov 24, 2025
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. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants