This is a basic calculator project written in JavaScript. It can perform the following operations:
- Addition
- Subtraction
- Multiplication
- Division
- Clone this repository:
git clone https://github.com/gunash-portfolio/Calculator_js.git
- Navigate to the project directory:
cd Calculator_js
- Open the
calculator.html
file in your web browser.
- Enter the first number.
- Enter the second number.
- Choose an operation (+, -, *, /).
- Click the "Add", "Subtract", "Multiply", or "Divide" button.
- The calculator will output the result of the operation.
The following built-in functions were used in this project:
onclick()
: This function is used to execute a JavaScript code when a button is clicked.getElementById()
: This function is used to get the value of an HTML element by its ID.innerHTML
: This property is used to set or get the HTML content of an element.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.