Java Script Project Part 2

In this lesson we will be going over the basic code for the buttons on our calculator. Seeing as we already have the basic UI we can now focus on making the actual calculator work. To do this we will need a list.

These will be my variables as of right now

The reason these images have the yellow triangle is because they have not been called/used yet in my program there is no other error with them.

Now that we have established some variables I will need to start adding basic code to the buttons that will allow us to add their values to our inputs list and then eventually to our results box.

This is the code for numbers 1-5

And this is the code for buttons 6-0

That’s pretty much it for this blog it was a short one as I didn’t really have that much done because I’m on break but next lesson we should be able to program the operators and these inputs in our list should be in our results box as well.