Homework 4

1. True or False: the following are valid JavaScript statements? (Answer each)

a. if (var == 4) { // Do something }

A: False

b. var testVar = 10;

A: True

c. if (a == b) { // Do something }

A: True

d. testVar = 10;

A: False, but the browser will still do it.

e. var case = “Yes”;

A: False

2. True or False: Semicolons are required to terminate every JavaScript statement

A: True, if the statements do not include code blocks

3. I decided to implement it

Type numOrdered in here:

The Function returned: null

Value of orderTotal: 0