A clean, web-based calculator built with vanilla HTML, CSS, and JavaScript — no frameworks, no dependencies.
- Standard arithmetic: addition, subtraction, multiplication, division
- Percentage (
%) and sign-toggle (±) operations - Keyboard input support
- Chained calculations
- Responsive layout
| Category | Technology |
|---|---|
| Markup | HTML5 |
| Styling | CSS3 |
| Logic | Vanilla JavaScript |
Open index.html in any browser — no build step needed.
open index.html
calculator/
├── index.html # Calculator layout
├── style.css # Styling and button grid
└── cal.js # Calculation logic and event handlers
- Building grid-based layouts with CSS
- Event-driven programming in JavaScript
- Managing calculator state (current input, operator, result)
- Handling edge cases: division by zero, chained operators
Made with ❤️ as part of a learning journey