-
-
Notifications
You must be signed in to change notification settings - Fork 147
London | May-2025 | Mohamed Ibrahim | Module-Data-Groups | Alarm Clock #563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
const seconds = parseInt(input.value, 10); | ||
|
||
if (isNaN(seconds) || seconds <= 0) { | ||
alert("Enter a number greater than 0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice job thinking about how to handle invalid input
const minutes = String(Math.floor(remainingSeconds / 60)).padStart(2, "0"); | ||
const seconds = String(remainingSeconds % 60).padStart(2, "0"); | ||
document.getElementById("timeRemaining").textContent = `Time Remaining: ${minutes}:${seconds}`; | ||
} | ||
|
||
// DO NOT EDIT BELOW HERE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should try to complete the task without editing below this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback! I moved them above the line as suggested, so nothing below was changed.
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.