Design and implement a calculator using HTML, CSS (with Bootstrap) and JavaScript. The calculator will only run in the browser, and must not depend on any server side scripting (C#).
Functional requirements:
-A display that shows entry and results
-Number buttons on the calculator
-Supports resetting the calculator (C function)
-Supports clearing the current entry (CE function)
-Handles user errors (e.g. pressing "5++5" leads to "5+5", pressing "5+-5 leads to "5-5")
-Supports using the result in the next calculation
Each element of the calculator needs to be labeled with the following HTML id attribute:
Display: display
Each number button must have the following IDs: 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'
+ button: 'plus'
- button: 'minus'
* button: 'multiply'
/ button: 'divide'
= button: 'equals'
C button: 'reset'
CE button: 'clear'
IDs are used to find buttons on the page, correctly labeling HTML elements with IDs is important for the tests to pass. Wrong labeling of IDs is a common error source!
Please try to organize and comment the JavaScript in a clean and tidy way