## Overview

In this lab we will manually evaluate complex expressions in order to better understand how JavaScript interprets these expressions step-by-step. You are required to show your work (i.e., show each step of how you evaluate/find the solution for each expression). The web console in the browser can help you check your answer, but it should not do the work for you.

## Resources

- http://www.w3schools.com/js/js_syntax.asp
- http://www.w3schools.com/js/js_statements.asp
- http://www.w3schools.com/js/js_comments.asp
- http://www.w3schools.com/js/js_variables.asp
- http://www.w3schools.com/js/js_operators.asp

## Lab work

### Step 1

Open a new text file and evaluate each of the following 10 expressions. Make sure to show ALL OF THE STEPS you took to solve the expression. Answers that do not show enough steps will receive a grade of 0. The first one has been done for you.

1 | "Dog" + 2 > 3 && true |

### Step 2

Now we are going to write our very first runnable JavaScript. Download a1.zip from D2L and extract the a1.html file. Inside the `<script>`

tags add the necessary JavaScript to create a word problem that includes a question and answer.

- A sample word problem may look like:
- Q: Jamie makes 5 cupcakes and eats 3 of them. How many cupcakes are left?
- A: 2
- The next time the page loads, the numbers should change, so the problem may look like:
- Q: Jamie makes 12 cupcakes and eats 7 of them. How many cupcakes are left?
- A: 5
- The numbers used in this word problem should change randomly. This means that we need to generate the numbers for the questions and the answer using JavaScript

Note: you will need to use the Math.random() function and the innerHTML property like we did in Lab Exercise 1 to complete this exercise.