/top-calculator

The final Project of the Foundations' Javascript Course

Primary LanguageJavaScript

Top-Calculator

Final Project of The Odin Project's Foundations JavaScript Course

Calculator Screenshot

Table of Contents

About the Project

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.

Features

  • 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.

Built With

  • 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.

Getting Started

Follow the instructions below to run the project on your local machine.

Installation

  1. Clone the repository to your local machine:

    git clone https://github.com/jorgenettodev/top-calculator.git
  2. Navigate to the project folder:

    cd top-calculator
  3. Open index.html in your preferred browser:

    open index.html

    Or simply drag and drop the index.html file into your browser window.

Usage

  1. Enter numbers and perform calculations using the on-screen buttons or your keyboard.
  2. Supported operations:
    • Addition (+)
    • Subtraction (-)
    • Multiplication (×)
    • Division (÷)
  3. Press the "Clear" button to reset the calculator.
  4. 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

Roadmap

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.

Contributing

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!

  1. Fork the project
  2. Create a feature branch:
    git checkout -b feature/new-feature
  3. Commit your changes:
    git commit -m "Add new feature"
  4. Push to the branch:
    git push origin feature/new-feature
  5. Open a pull request

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

Jorge Netto