This project is a simple calculator built as the final project of the Foundations Course from The Odin Project
It can perform basic arithmetic operations and accepts both button clicks and keyboard input.
- Operates on numbers with a sign (positive/negative).
- Supports the basic arithmetic operators:
+,-,ร,รท. - Handles floating point numbers using the
.button. - Accepts keyboard input for faster usage.
DELbutton deletes one number at a time.CLEARbutton clears the entire input.
- Backspace โ acts as
DEL(delete one element). - Number keys (0โ9) โ input numbers.
- Arithmetic keys (
+ - * /) โ input operators. - Enter / = โ evaluates the expression.
- Initially, a flag variable was used to determine which number should be taken as input.
As the project grew, managing this flag became messy so I had to find a different approach. - Refactored the logic to depend on the operator state, which was much easier to track and extend.
- This was my first attempt at responsive design. The calculator currently renders smaller than expected on some devices, but improving responsiveness will be a focus for future updates.
Made by Shaun ๐
