Design comparison
Solution retrospective
Hello😁! My name is Huy, and this is my solution for this challenge.
What I used🚀: HTML, CSS, Typescript, Svelte, Moment.js.
Thank you! Cheers🎉.
Community feedback
- @gabrielmorandiPosted over 1 year ago
Hi @huyphan2210, good job completing this challenge!
Your code looks great, and I can see that you put a lot of effort into it. I especially like how you handled the input validation and error cases.
One suggestion I have is to add an event listener to trigger the
calculateAge()
function whenever the enter key is pressed in one of the input fields. You can do this by modifying yourhandleFocusOut()
function like this:// Add event listener to trigger calculateAge() on enter key press e.currentTarget.addEventListener("keydown", (event) => { if (event.keyCode === 13) { calculateAge(); } });
Overall, great work, and keep up the good coding! 😄
Marked as helpful0@huyphan2210Posted over 1 year ago@gabrielmorandi Hey! Thank you for checking my code. I really appreciate it. 😁
1
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