Skip to content
Submitted over 1 year ago

React.JS Calculator App implementing Parser for Arithmetic Expressions

react, tailwind-css, typescript
LVL 3
@UnsuspectedNoob
A solution to the Calculator app challenge

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

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