Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

React.JS Calculator App implementing Parser for Arithmetic Expressions

react, tailwind-css, typescript
UnsuspectedNoob•230
@UnsuspectedNoob
A solution to the Calculator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I successfully implemented the arithmetic expression parser in typescript, made sure the keys typed only the allowed grammar, and carefully used regular expressions to keep the commas within the numbers.

Differently, I would spend more time working on the concept of the functionality of the calculator rather than jumping into the code with assumptions.

What challenges did you encounter, and how did you overcome them?

It was a pain trying to get all the tiny bugs with the arithmetic of the calculator, but I managed to do it after looking at the big picture and making the parts smaller.

What specific areas of your project would you like help with?

How do you know when your supposed to use regular expressions and when a simple comparison would be better or more efficient ?

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 UnsuspectedNoob'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