Lil-StarcastLvl 6
- macOS
I'm assigning my self this assignment: Code a website that has nothing in it but a calculator. But can someone tell me HOW?
I'm assigning my self this assignment: Code a website that has nothing in it but a calculator. But can someone tell me HOW?
Quick google and I found this tutorial: https://www.simplilearn.com/tutorials/javascript-tutorial/calculator-in-javascript
Hey, TheMangle.
So you will need some HTML elements to have operating your JavaScript.
The simplest option would be to have 2 number inputs, but you could have number buttons instead.
Here are the necessary input tags for number buttons:
<input type="button" value="0" id="0"/>
<input type="button" value="1" id="1"/>
<input type="button" value="2" id="2"/>
…
Add those tags until you reach the value of 9.
I’ll add the rest later.
Thank you both for this information. 😊