A sleek, responsive basic calculator built using HTML, CSS, and JavaScript. It supports basic arithmetic operations and mimics the look and feel of a modern calculator.
- Responsive, modern UI
- Basic operations:
+,-,×,÷ - AC (All Clear), C (Backspace), +/- toggle
- Decimal input and real-time display update
- Error handling for invalid operations
- Clone the repository:
git clone https://github.com/your-username/calculator-project.git cd calculator-project
-
Open index.html in your browser.
-
That’s it! Your calculator should now be running.
-
Semantic layout with a simple structure
-
Uses input field for live display updates
-
Flexbox and CSS Grid for layout
-
Modern dark theme with button hover effects
Core functions:
-
press(val) for input handling
-
calculate() for expression evaluation
-
Uses eval() with input sanitization
-
⌨️ Keyboard input support
-
🌗 Dark/Light mode toggle
-
% Modulo and memory features
-
🧮 Scientific calculator mode
- This project is open-sourced under the MIT License.
🤝 Contributions
- Feel free to fork the repo, submit pull requests, or open issues!