Calculator preview

Calculator

A functional web calculator that performs basic arithmetic operations.

JavaScript HTML CSS

How it was implemented

Buttons emit input events to update an expression string. Operators are validated to avoid invalid sequences, and the result is safely evaluated.

What I learned

  • Building a clean input model for calculators.
  • Managing edge cases like leading zeros and chained ops.
  • Keeping the UI snappy with minimal DOM work.