Skip to content

Conversation

Emmanuelgessessew
Copy link

Learners, PR Template

Self checklist

  • [yes ] I have committed my files one by one, on purpose, and for a reason
  • [ yes] I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • [ yes] I have tested my changes
  • [ yes] My changes follow the style guide
  • [ yes] My changes meet the requirements of this task

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

@Emmanuelgessessew Emmanuelgessessew added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Dec 30, 2024
@cjyuan cjyuan added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jan 14, 2025
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

  • Code works fine if a user only clicks the "Set Alarm" button once. However, if the user enters a time and then clicks the "Set Alarm" button multiple times, the countdown clock will not display properly. Can you fix the problem?

  • You missed updating index.html according to an instruction in readme.md.

  • Suggestion:
    Instead of calling document.getElementById("timeRemaining") repeatedly to get the element, a better practice would be to store the selected element in a variable.

Comment on lines 3 to 9
let timeRemaining = Number(document.getElementById("alarmSet").value);


if (isNaN(timeRemaining) || timeRemaining <= 0) {
alert("Please enter a positive number!");
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Some unusual input values that can make your app behave abnormally can still pass this check. Can you add code to sanitise this kind of values?

Copy link
Author

Choose a reason for hiding this comment

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

i added the code accordingly.

@cjyuan cjyuan 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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jan 14, 2025
@Emmanuelgessessew Emmanuelgessessew added the Complete Volunteer to add when work is complete and all review comments have been addressed. label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complete Volunteer to add when work is complete and all review comments have been addressed. 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.

3 participants