Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/withaarzoo/calculator
https://github.com/withaarzoo/calculator
Last synced: about 10 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/withaarzoo/calculator
- Owner: withaarzoo
- Created: 2023-02-13T10:18:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-13T10:22:47.000Z (almost 2 years ago)
- Last Synced: 2023-12-30T18:51:51.634Z (11 months ago)
- Language: HTML
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Calculator
A simple calculator implemented using HTML, CSS and JavaScript.## Features
* Basic arithmetic operations (addition, subtraction, multiplication, division)
* AC button to clear the display
* DE button to delete the last digit
* Evaluates the expression and shows the result when you press the "=" button## How to run
To run the calculator, simply open the `index.html` file in your browser.## Code Overview
The HTML file contains the structure and design of the calculator. It includes a display where the expression is displayed, and buttons for performing various operations.The CSS file provides the styling for the calculator, using the Roboto font and a gradient background.
The JavaScript file uses event listeners to listen to button clicks, and performs the necessary actions based on the button id. The expression is evaluated using the `eval()` function.
## Preview