Design comparison
SolutionDesign
Solution retrospective
wanted to get some practice with JavaScript. not happy with the code, I think I could've simplified things better. any pointers on how I could've condensed the code? I couldn't figure out how to get the numbers on the display to float right. through the responsive settings on my browser the pages works fine, however on my phone whenever I try inputting numbers into the calculator every number takes a new line.
Community feedback
- @Kl3vaPosted over 2 years ago
You can try using the event delegation to target elements from it’s parent by setting up one event handler rather than setting in all elements to avoid repetition.
Marked as helpful0
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