Launch countdown timer app using Bootstrap 5 and vanilla JS
Design comparison
Solution retrospective
Any feedbacks and suggestions are welcome.
Community feedback
- @MojtabaMosaviPosted almost 3 years ago
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 helpful0@cliffordjfedevPosted almost 3 years ago@MojtabaMosavi 1- You're right! I have to stop repeating myself, with a reusable function the code would be cleaner.
2- I saw your solution and your codes there is a huge difference, the truth is that I have to practice more to improve my skills and know when and how to create a clean component.
If you have any suggestions on how I can improve my skills feel free to tell me.
Thanks for your feedbacks!
0@MojtabaMosaviPosted almost 3 years ago@cliffordjfedev Pick project --> Focus on learning new things and improving --> Practice Practice Practice And loop it until infinity.
0 - @MhamadTlaygePosted almost 3 years ago
nice one bro
0
Please log in to post a comment
Log in with GitHubJoin 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