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

Mobile first responsive vanilla js, css-flex

Avatarfreak•655
@avatarfreak
A solution to the Calculator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This is a project build with pure js and CSS. This was a fun challenge and at the same time challenging. I have tried to implement all the possible functionality. Any suggestion would be appreciated.

  • No consecutive operators are allowed.
    eg: +/-*
  • operator gets replaced with a later one.
    eg: 1+- -> 1+ or 2-* -> 2*
  • A operand can only have a single decimal.
    eg: 0.1 or 1.0 but not 0..1 or 1..0
  • Infinity if divisor equals zero.
  • Throw an error if the initial operand is '/' or '*'
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 Avatarfreak'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

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