-
-
Notifications
You must be signed in to change notification settings - Fork 155
WESTMIDLANDS| ITP-MAY2025| Roja Alagurajan| Alarm Clock. #692
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
Sprint-3/alarmclock/alarmclock.js
Outdated
updateTitle(); | ||
} else { | ||
updateTitle(); |
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.
It seems the app is going to call updateTitle()
regardless of the condition. Perhaps you can factor out the common statement from of if-else block.
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.
Hi @cjyuan ,
Thank you for your suggestion regarding refactoring the updateTitle() calls. I have updated my code by removing the else block and calling updateTitle() once after the conditional check inside the timer interval.
Changes look good. Well done! |
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.