Launch countdown timer app using Bootstrap 5 and vanilla JS

Solution retrospective
Any feedbacks and suggestions are welcome.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @MojtabaMosavi
1- In You js your repeating the same logic for prepanding zeros quite a few times which you should avoid, remember we as programmers always strive to not repeat ourself thus being DRY. You can define a resuable function like:
const prepandZero = (time) =>{ time < 10 ? `${0time}` : `${time}`}
2- In situations where it's possible to take implement something as a component you should always prioritize it because it create cohesive structure and save you from writing some line of css plue you can resue it in other projects. For instance the coutdown could be implemented as a component, take a look at my solution for more details https://www.frontendmentor.io/solutions/launchcountdowntimermain-RFKBZhKW9
Keep coding :=)
Marked as helpful - @MhamadTlayge
nice one bro
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord