Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 3 years ago

Calculator app using vanilla js

Matthew Van Pelt•575
@Mattvp21
A solution to the Calculator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Made with html/css/javascript, the basics. The calculator logic went fine in my opinion but I got stuck with the toggle, as I didn't really know how to handle a 3 way switch like that. Learn something new everyday. I think I handled it in a bit of an weird way. I just turned off the opacity on the non active buttons since using display none and hiding it took them off the page and turned it back on depending on which button is active. Let me know if there's another way to do this. Also, I see now I have mobile problems. I've been practicing alot of javascript and I think I lost a step in my css fundamentals. The reset and equal buttons both gave me alot of problems. I appreciate all feedback.

Thanks!

Matt

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Matthew Van Pelt's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License