0
How to use javascrpt in calculator
how can I get a calculator by JavaScript
2 Respuestas
0
You'll need some functions to handle the operations you want your calculator to have.
1. A function for addition. It accepts two numbers and returns the sum.
2. Subtraction. Accepts two numbers and returns the difference.
3. Multiplication. This one returns the product of two numbers. et cetera ..
Now create the UI using HTML and CSS.
Add appropriate events to the buttons..
Don't forget to do data validation in your code..
Next
0
On second thought, I advised you to write some needless functions. Please do some research and find the right way. But my approach is correct nevertheless.