The main goal was to make a calculator that would take operations and display them.
First of all, I had to create 8 functions to them with the buttons :
- clear, to clear my screen
- delete, to delete the number or the operand I just clicked on
- addNumber, to add a number when pressing on it
- operator, to make the actual number become the previousOperand
- compute, to make an operation
- getDisplayNumber
- updateDisplay
Then, I had to tell each button what to do, meaning to make each number buttons display a number, and each operation button I want them to do an operation etc...
I used a few youtubes videos, few stackoverflow forums. I also used : - Javascript
- HTML
- CSS