A simple calculator built using HTML, CSS, and Vanilla JavaScript to perform basic arithmetic operations.
This project was created to practice core JavaScript concepts like DOM manipulation, event handling, and error handling.
- Basic arithmetic operations:
+ , - , * , / , % - Real-time input display
- Backspace functionality (delete last input)
- Clear button to reset the calculator
- Error handling for empty or invalid expressions
- HTML
- CSS
- JavaScript (ES6)
- Handling button clicks using event listeners
- Building expressions using strings
- Using
try...catchfor error handling - Implementing backspace and clear logic
- Understanding how calculators evaluate expressions