0

How to use javascrpt in calculator

how can I get a calculator by JavaScript

25th Mar 2017, 4:24 PM
Pallavi Rani
Pallavi Rani - avatar
2 odpowiedzi
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
25th Mar 2017, 9:02 PM
showthecode
showthecode - avatar
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.
25th Mar 2017, 9:06 PM
showthecode
showthecode - avatar