2jomcd / calculator_lab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Calculator

git clone this repo to start the calculator homework.

You can open calculator.html to see the (nonfunctional) calculator page. You're gonna make it work!

  1. calculator.js is provided and linked to the page for you, but it's blank, what's the first thing you write? (Without it, your JS won't be able to find any HTML elements on the page---why?)

  2. Once you're able to get the elements on the page, you want to know about clicks to the buttons. How can you listen to click events on all the buttons? (Remember exercises 3 and 4?) For debugging purposes, make sure you can get it so something is logged to the console whenever a button is clicked.

  3. Great, now you know when clicks happen. What do you want to do when clicks happen? Do you want to the number display? Update the operator display? Clear a display? The answer to each of those is "sometimes", right? When, then? How do you decide what to do?

About


Languages

Language:JavaScript 90.2%Language:CSS 9.8%