/Javascript-Calculator

This is a simple calculator app implemented using React. It allows users to perform basic arithmetic calculations by inputting mathematical expressions.

Primary LanguageJavaScript

Calculator App

This is a simple calculator app implemented using React. It allows users to perform basic arithmetic calculations by inputting mathematical expressions.

Preview

preview

Features

  • Input mathematical expressions using the calculator buttons.
  • Perform calculations with addition, subtraction, multiplication, and division.
  • Clear the current expression or reset the calculator.
  • Display the current expression and the calculated result.

How to Run

To run the calculator app locally, follow these steps:

  1. Make sure you have Node.js installed on your machine.

  2. Clone this repository to your local machine or download the source code.

  3. Open a terminal or command prompt and navigate to the project directory.

  4. Install the dependencies by running the following command:

npm install

  1. After the installation is complete, start the development server:

npm start

  1. Open your web browser and visit http://localhost:3000 to view the calculator app.

How to Use

  1. Enter the mathematical expression by clicking the calculator buttons. The expression will be displayed in the input field at the top.

  2. Use the numeric buttons (0-9) for digits, and the operation buttons (+, -, *, /) for arithmetic operations.

  3. Press the "=" button to calculate the result of the expression.

  4. To clear the current expression, click the "C" button. To reset the calculator, click the "AC" button.

Technologies Used

  • React: A JavaScript library for building user interfaces.

  • HTML: The markup language used for structuring the app.

  • CSS: The styling language used for visual design.

License

This project is licensed under the MIT License.

Credits

This calculator app was created as part of the FreeCodeCamp curriculum. The project structure were provided by FreeCodeCamp. You can find more information and coding challenges at FreeCodeCamp.