List of Figures

 

Chapter 1. Programming, JavaScript, and JS Bin

Figure 1.1. JS Bin showing the HTML, CSS, Output, and Info panels

Figure 1.2. JS Bin showing the JavaScript and Console panels.

Figure 1.3. The steps for running JavaScript on JS Bin

Figure 1.4. The JS Bin error section (closed and then open)

Figure 1.5. Line numbers are helpful when finding errors.

Figure 1.6. Playing The Crypt

Figure 1.7. Game elements in The Crypt for part 1

Figure 1.8. Game elements in The Crypt for part 2

Figure 1.9. Game elements in The Crypt for part 3

Chapter 2. Variables: storing data in your program

Figure 2.1. Declaring a variable

Figure 2.2. Assigning a value to a variable

Figure 2.3. The equals sign is called the assignment operator.

Figure 2.4. You declare a variable and assign it a value in a single statement.

Figure 2.5. Updating a variable with the result of a calculation involving itself

Figure 2.6. JavaScript has some words that can’t be used as variable names.

Figure 2.7. Elements in The Crypt

Chapter 3. Objects: grouping your data

Figure 3.1. You log an object to the console on JS Bin.

Figure 3.2. Set properties by using key-value pairs.

Figure 3.3. An object definition with two properties

Figure 3.4. Accessing object properties using dot notation

Figure 3.5. Elements in The Crypt

Chapter 4. Functions: code on demand

Figure 4.1. Movie information shown on the console in JS Bin

Figure 4.2. The pieces of a function definition