🚀 Why I built this project
After completing my first project (Tic Tac Toe), I wanted to build something that helped me understand real-world JavaScript logic and DOM manipulation more clearly.
A calculator felt like the perfect next step — simple, useful, and logic-driven.
🧩 What I built
I built a simple browser-based calculator that can:
Perform basic arithmetic operations (+, −, ×, ÷)
Clear the display
Delete the last entered value
Handle decimal numbers
Show errors for invalid expressions
The entire project runs purely on the frontend, without any libraries or frameworks.
🧠 What I learned
This project helped me understand:
How JavaScript connects with HTML using the DOM
How button click events work
How to update UI dynamically
How CSS Grid helps create clean layouts
How to structure a small project properly
I also learned how small bugs (like invalid expressions) can break logic — and how to handle them safely.
⚠️ Challenges I faced
Managing user input correctly
Preventing crashes when expressions are invalid
Designing a clean UI with proper spacing
Making sure the calculator feels intuitive
Solving these issues improved my debugging skills and confidence.
🌱 What I’ll improve next
Add keyboard input support
Build a version without using eval()
Add a dark/light theme toggle
Store calculation history
🙌 Final thoughts
This project may look simple, but it taught me a lot about thinking logically, breaking problems into steps, and building complete working software.
On to the next project 🚀
Thanks, Hack Club, for motivating me to learn by building!