JQuery is a Javascript library that is used to simplify common Javascript tasks that generally take several lines to accomplish. The motivation behind JQuery is to “write less, do more”. In the past, JQuery was very popular as Javascript was very difficult to learn however with the advancements of Javascript (particularly ES6), JQuery has become mostly obscelete. JQuery is still used at times for some applications (e.g. Bootstrap still uses JQuery for interaction). Nowadays, most applications can be accomplished using Javascript alone. For this course, you will be required to know some basic uses of JQuery. It will not be necessary for this tutorial but you can read more about it on the JQuery documentation
Credits for this exercise to Ayo Isaiah
Starter code is given here
For today’s lab, we will be making a calculator application. Your calculator must be able to perform the following actions:
Despite being a simple task, this application is not very trivial. For instance, think about how the numbers will be pushed to the display and how the application will keep track of the numbers after clicking something like +
or -
. If you feel stuck, please try to ask for help
Feel free to modify the HTML structure if you are finding its structure to be difficult to work with