HTML Lists, Control Flow with JS, and the CSS Box Model

Chapter 3: Lists (pp.62-73)


Chapter 13: Boxes (pp.300-329)


Review Chapter 2: Basic JavaScript Instructions (pp.70-73)


An array is a special type of variable. It doesn’t just store one value; it stores a list of values. You should consider using an array whenever you are working with a list or a set of values that are related to each other.

Array Literal

The preferred method of creating an array. The values in the array do not need to be the same data type, so you can store a string, number and a Boolean all in the same array.The values assigned to the array inside a pair of square brackets, and each value is separated by a comma.

Array Constructor

This uses the new keyword followed by Array();The values are then specified in parentheses not square brackets, and each value is separated by a comma and placed in different lines. You can also use a method called item() to retrieve data from the array.

Numbering Items in an Array

Each item in an array is automatically giveb a number called an index. This can be used to access specific items in the array

Chapter 4: Decisions and Loops (pp.162-182)


If…Else Statements

The if…else statement checks a condition. If it resolves true, the first code block is executed. If the condition resolves false, the second code block is run instead.

Switch Statements

A switch statement starts with a variable called the switch value. Each case indicates a possible value for this variable and the code that should run if the variable matches that value.