/javascript-calculator

Simple calculator written in JavaScript. Link below to a live demo ⬇

Primary LanguageJavaScript

JavaScript Calculator

This is a simple calculator wrote in JavaScript as a side project to learn JavaScript.

Instructions for use of the calculator

  1. Dowload the source code, you can do it either in zip file or by cloning the repository.

Download Image

  1. Open the HTML file in a web browser.

Open HTML file

  1. On the calculator web page, you will see three input fields: "Operator 1", "Operation", and "Operator 2".

Home Page

  1. Enter a number in the "Operator 1" field.

Operator 1 Arrow

  1. Enter one of the allowed mathematical operations ("+", "-", "*", "/") in the "Operation" field.

Opeartion Arrow

  1. Enter another number in the "Operator 2" field.

Operator 2 Arrow

  1. Click the "Calculate" button.

Click "Calculate"

  1. If you have entered the values correctly, the result of the mathematical operation will be displayed below the "Calculate" button.

Correct Result Arrow

  1. If you have entered incorrect values, an error message will be displayed instead of the result.

Error Message Arrow

That's it! Now you can use the Javascript calculator in your web browser.