A simple, responsive, and fully functional calculator built using HTML, CSS, and JavaScript.
This project demonstrates core front-end development skills including DOM manipulation, event handling, and logical problem solving.
✨ Basic arithmetic operations
- Addition (+)
- Subtraction (−)
- Multiplication (×)
- Division (÷)
✨ Smart functionality
- Handles chained operations (e.g.,
12 + 7 - 1 = 18) - Prevents division by zero with a custom error message 😏
- Rounds long decimal numbers
- Prevents multiple operator errors
✨ User-friendly controls
- Clear button (C)
- Backspace (⌫)
- Decimal support (.)
- Responsive display
- HTML5 → Structure
- CSS3 → Styling & Layout
- JavaScript (ES6) → Logic & Functionality
calculator-project/ │── index.html │── style.css │── script.js │── README.md
- User inputs numbers using buttons
- Operator is selected (+, −, ×, ÷)
- Second number is entered
- On pressing
=, the calculator:- Calls the
operate()function - Performs the calculation
- Displays the result
- Calls the
✔ Supports continuous calculations
✔ Stores previous results for next operations
- DOM Manipulation
- Event Handling
- Functions & Control Flow
- State Management
- Input Validation
(Optional: Add a screenshot here)
- ⌨️ Keyboard support
- 🎨 Advanced UI design (modern calculator theme)
- 🌙 Dark/Light mode toggle
- 📱 Mobile responsiveness improvements
Salvin Sebastian
🎓 BCA Student
💻 Passionate about Web Development
🔗 GitHub: https://github.com/salvin-sebastian
🔗 Portfolio: Visit My Portfolio
If you like this project, consider giving it a ⭐ on GitHub!