In this project, we'll make a simple old-fashioned calculator that can do addition, subtraction, multiplication, division, and more.
1. Add a title to your new page.
2. Create a grid of buttons for your calculator. You need numbers from 0 to 9; operators for addition, subtraction, multiplication, and division; and a period and an equals button.
3. Above the buttons, create an empty
div. This will be the space for the screen.
5. Now make it so that when any number button is clicked, it gets added to the screen.
6. Do the same for every other button except equals.
7. Next to the screen, or under the keypad, create a "delete" button.
8. Make it so that when the "delete" button is clicked, one character at a time gets deleted from the screen.
9. Next to the "delete" button, make a "clear" button.
10. When the "clear" button is clicked, make it clear the whole screen.
11. When the equals button is clicked, make it do what's on the screen.
Hint: check out
12. Add style to your page with CSS!
13. Save and share your project!