https://github.com/ribafs/javascript-calculators
Examples from simple sum to scientific calculator
https://github.com/ribafs/javascript-calculators
calculator division javascript multiplication operations scientific simple subtraction sum
Last synced: about 1 month ago
JSON representation
Examples from simple sum to scientific calculator
- Host: GitHub
- URL: https://github.com/ribafs/javascript-calculators
- Owner: ribafs
- License: mit
- Created: 2022-01-12T16:22:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-04T12:31:21.000Z (almost 3 years ago)
- Last Synced: 2025-08-15T19:52:10.610Z (about 2 months ago)
- Topics: calculator, division, javascript, multiplication, operations, scientific, simple, subtraction, sum
- Language: HTML
- Homepage: https://ribafs.github.io/javascript-calculators
- Size: 16.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# javascript-calculator
## Examples from simple sum to scientific calculator
## Only sum and simple code
calc_sum.html### Example shared in Facebook group HTML, CSS and JS
```const add = (...nums) => alert(nums.reduce((a, b) => +a + +b));
add(...Array.from({length:2}, _ => prompt('Please enter a number...')));
//Although if you only see it as 1 input for the entire equation, it could be even more direct.
alert(eval(prompt('Please enter equation').replace(/[^%+-/*/(/)\d+]/g, '')));```
Thank you Shawn John Genlloud## Four operations and simple code
calc_js.htm## Four operations and simplel and only one function and form
calc_js2.html## With keyboard and simple code
calc_js3.html## Scientific calculator
calc_cient.html## References
https://stackoverflow.com/questions/60346902/i-cant-do-a-simple-calculator-with-javascript
https://medium.com/@singhamritpal49/creating-simple-addition-calculator-with-javascript-563ede3527e2
https://www.codigofonte.com.br/codigos/calculadora-em-html-e-javascript
https://comodesenvolver.com.br/como-criar-uma-calculadora-cientifica-usando-html-javascript-e-css/
http://www.devin.com.br/calculadoras-javascript/
## License
MIT