Duration: 3 days
A server side calculator that will take user calculator inputs, send them to the server, run the logic server side and then return the total value.
The total is rendered on the DOM on successful return of the total from the server.
A history of user inputs is stored in an array server side. On successful inputs, the client requests the history array from the server. On successful get request of the history the client side loops through the array and appends the history to the DOM below the calculator.
A clear button on the calculator will clear the user's inputs and reset the operator client side.
A delete button for the history will send a delete request to the server to wipe the history array. On successful delete request the client side will reappend the history array to the DOM to show it has been cleared.
If the user would like to use multiple operators, instead of one operator and the equals button, the two values and first operator are sent to the server to run through the logic. On success the total will be returned and appended to the first value of the input in the calculator with the operator selected, for the third number to be put in. This can repeat until the equals button is selected. This forces order of operation to be determined by the user.
- Click on numbers for the first number.
- Click an operator to perform on the first number.
- Click on numbers for a second number.
- Click '=' or another operator to get the current total.
- If another operator, click numbers for a third number to perform that operator on the previous total and the third number.
- Repeat until finished. Finish by pressing '='.
- To clear inputs hit the 'C' button.
- To clear the history hit the 'Clear History' button.
HTML, CSS, Javascript, jQuery, Node.js, Express.js, Ajax
Thank you to Prime Digital Academy for equipping me with the skills and determination to overcome daunting obstacles and produce a project to be proud of.
If you have suggestions or issues, please email me at husomichael@gmail.com