Final Project of The Odin Project's Foundations JavaScript Course
This project is a fully functional calculator built using JavaScript, HTML, and CSS as part of The Odin Project's Foundations course. The goal was to deepen my understanding of JavaScript fundamentals by applying them in a real-world project. The calculator supports basic arithmetic operations and keyboard input.
- Perform basic arithmetic operations: Addition, Subtraction, Multiplication, and Division.
- Supports decimal inputs and negative numbers.
- Clear the screen using the "Clear" button.
- Responsive design, making the calculator functional on mobile devices.
- Supports keyboard inputs for easier use.
- HTML5: Structure of the calculator.
- CSS3: Styling, including layout and responsive design.
- JavaScript: Core functionality of the calculator, such as performing calculations and handling user input.
Follow the instructions below to run the project on your local machine.
-
Clone the repository to your local machine:
git clone https://github.com/jorgenettodev/top-calculator.git
-
Navigate to the project folder:
cd top-calculator
-
Open
index.html
in your preferred browser:open index.html
Or simply drag and drop the
index.html
file into your browser window.
- Enter numbers and perform calculations using the on-screen buttons or your keyboard.
- Supported operations:
- Addition (+)
- Subtraction (-)
- Multiplication (×)
- Division (÷)
- Press the "Clear" button to reset the calculator.
- You can use the keyboard for number entry and operations. Supported keys:
- Numbers (0-9)
- Operators (+, -, *, /)
- Enter/Return to calculate
- Backspace to delete the last entry
- "C" to clear the screen
Potential future improvements:
- Implement percentage functionality.
- Add more advanced operations like square root, exponents, etc.
- Improve user experience with error handling for cases like division by zero.
- Refine the design for a more modern look and feel.
If you'd like to contribute to this project, feel free to fork the repository and submit a pull request. Any suggestions or enhancements are welcome!
- Fork the project
- Create a feature branch:
git checkout -b feature/new-feature
- Commit your changes:
git commit -m "Add new feature"
- Push to the branch:
git push origin feature/new-feature
- Open a pull request
This project is licensed under the MIT License. See the LICENSE
file for details.
Jorge Netto