Get Programming with JavaScript - Contents

  1. Part 1 – Core concepts on the console

    1. Chapter 1 – Programming, JavaScript and JS Bin

      1. 1.1 Programming
      2. 1.2 JavaScript
      3. 1.3 Learning by doing and thinking
      4. 1.4 JS Bin
      5. 1.5 The Crypt: our running example
      6. 1.6 Further examples and practice
      7. 1.7 Browser support
      8. 1.8 Summary
    2. Chapter 2 – Variables: storing data in your program

      1. 2.1 What is a variable?
      2. 2.2 Declaring variables and assigning values
      3. 2.3 Choosing good variable names
      4. 2.4 The Crypt - player variables
      5. 2.5 Summary
    3. Chapter 3 – Objects: grouping your data

      1. 3.1 A need for organization
      2. 3.2 Creating objects
      3. 3.3 Accessing object properties
      4. 3.4 Updating object properties
      5. 3.5 Further examples
      6. 3.6 The Crypt - a player object
      7. 3.7 Summary
    4. Chapter 4 – Functions: code on demand

      1. 4.1 Noticing repetition
      2. 4.2 Defining and calling functions
      3. 4.3 Reducing repetition
      4. 4.4 Making code easier to read and update
      5. 4.5 The Crypt - displaying player information
      6. 4.6 Summary
    5. Chapter 5 – Arguments: passing data to functions

      1. 5.1 Function reuse and versatility
      2. 5.2 Passing information to functions
      3. 5.3 The Crypt - displaying player information
      4. 5.4 Summary
    6. Chapter 6 - Return values: getting data from functions

      1. 6.1 Returning data from functions
      2. 6.2 Experimenting at the console prompt
      3. 6.3 The Crypt - building player information strings
      4. 6.4 Summary
    7. Chapter 7 - Object arguments: functions working with objects

      1. 7.1 Using objects as arguments
      2. 7.2 Returning objects from functions
      3. 7.3 Methods: setting functions as properties of objects
      4. 7.4 The Crypt - player objects as arguments
      5. 7.5 Summary
    8. Chapter 8 – Arrays: putting data into lists

      1. 8.1 Creating arrays and accessing elements
      2. 8.2 Array methods
      3. 8.3 The Crypt - a player items array
      4. 8.4 Summary
    9. Chapter 9 – Constructors: building objects with functions

      1. 9.1 Using functions to build objects
      2. 9.2 Using constructor functions to build objects
      3. 9.3 Building mastery - two examples of constructors
      4. 9.4 The Crypt - providing places to plunder
      5. 9.5 The Crypt - streamlining player creation
      6. 9.6 Summary
    10. Chapter 10 – Bracket notation: flexible property names

      1. 10.1 Using square brackets instead of dots
      2. 10.2 The Crypt - enhancing exit excitement
      3. 10.3 The Crypt - let the games begin!
      4. 10.4 What's next?
      5. 10.5 Summary
  2. Part 2 – Organizing your programs

    1. Chapter 11 – Scope: hiding information

      1. 11.1 The dangers of global variables
      2. 11.2 The benefits of local variables
      3. 11.3 Interfaces - controlling access and providing functionality
      4. 11.4 Creating a quick quiz app
      5. 11.5 The Crypt - hiding player info
      6. 11.6 The Crypt - hiding place info
      7. 11.7 The Crypt - user interaction
      8. 11.8 Summary
    2. Chapter 12 – Conditions: choosing code to run

      1. 12.1 Conditional execution of code
      2. 12.2 Generating random numbers with Math.random()
      3. 12.3 Further conditions with else if
      4. 12.4 Checking answers in the quiz app
      5. 12.5 The Crypt - checking user input
      6. 12.6 Summary
    3. Chapter 13 – Modules: breaking a program into pieces

      1. 13.1 Understanding bins and files on JS Bin
      2. 13.2 Importing files into other projects
      3. 13.3 Importing the Number Generator - further examples
      4. 13.4 Importing multiple files
      5. 13.5 Collisions - when imported code overwrites your variables
      6. 13.6 Immediately invoked function expressions (IIFE)
      7. 13.7 The Crypt - organizing code into modules
      8. 13.8 Summary
    4. Chapter 14 – Models: working with data

      1. 14.1 Building a fitness app - data and models
      2. 14.2 The Crypt - separating map data from the game
      3. 14.3 Summary
    5. Chapter 15 - Views: displaying data

      1. 15.1 Building a fitness app - displaying the latest user data
      2. 15.2 The Crypt - moving view code from Player and Place
      3. 15.3 The Crypt - talking to players with a message view
      4. 15.4 Summary
    6. Chapter 16 - Controllers: linking models and views

      1. 16.1 Building a fitness app - controllers
      2. 16.2 The Crypt - adding a game controller
      3. 16.3 The Crypt - the structure of the controller code
      4. 16.4 The Crypt - starting and stopping the game
      5. 16.5 The Crypt - giving commands and solving puzzles
      6. 16.6 The Crypt - running the game
      7. 16.7 The Crypt - what's next for the app?
      8. 16.8 Summary
  3. Part 3 - JavaScript in the browser

    1. Chapter 17 - HTML: building web pages

      1. 17.1 HTML, CSS, JavaScript - building a web page
      2. 17.2 HTML - a very short introduction
      3. 17.3 Adding content to a web page with JavaScript
      4. 17.4 Displaying data from an array
      5. 17.5 The Crypt - displaying players and places with web views
      6. 17.6 Summary
    2. Chapter 18 – Controls: getting user input

      1. 18.1 Working with buttons
      2. 18.2 Using a select element to choose an option
      3. 18.3 Reading user input with text boxes
      4. 18.4 The Crypt - player commands via a text box
      5. 18.5 Summary
    3. Chapter 19 – Templates: filling placeholders with data

      1. 19.1 Building a news page - breaking news
      2. 19.2 Replacing one string with another
      3. 19.3 While loops - replacing a string multiple times
      4. 19.4 Automating placeholder replacement for templates
      5. 19.5 Building a news page - news just in
      6. 19.6 The Crypt - improving the views
      7. 19.7 Summary
    4. Chapter 20 – XHR: loading data

      1. 20.1 Building a fitness app - retrieving user data
      2. 20.2 JSON - a simple data format
      3. 20.3 The Crypt - loading a map on demand
      4. 20.4 Summary
    5. Chapter 21 - Conclusion: get programming with JavaScript

      1. 21.1 Working locally with files
      2. 21.2 Getting help
      3. 21.3 What next?
      4. 21.4 Summary
  4. Part 4 – The server, Node, Express and Socket.io
    (online extras)

    1. Chapter 22 – Node: running JavaScript outside the browser

      1. 22.1 Running JavaScript with Node.js
      2. 22.2 Turning your code into Node modules
      3. 22.3 Executing JavaScript with the read-eval-print loop
      4. 22.4 The Crypt - starting a local project
      5. 22.5 The Crypt - tracking multiple players
      6. 22.6 The Crypt - controlling players
      7. 22.7 Summary
    2. Chapter 23 – Express: building an API

      1. 23.1 Installing packages from npm
      2. 23.2 Creating a web server with Express
      3. 23.3 Sending data to and from the server
      4. 23.4 The Crypt - server and client code
      5. 23.5 The Crypt - building the game server
      6. 23.6 The Crypt - loading data in the browser
      7. 23.7 Summary
    3. Chapter 24 – Polling: repeating requests with XHR

      1. 24.1 High Fives - building an auction app
      2. 24.2 High Fives - polling the server for updates
      3. 24.3 The Crypt - running a central server
      4. 24.4 The Crypt - managing multiple games on the browser
      5. 24.5 The Crypt - managing multiple games on the server
      6. 24.6 The Crypt - keeping players updated
      7. 24.7 Summary
    4. Chapter 25 – Socket.IO: real-time messaging

      1. 25.1 sending messages with Socket.IO
      2. 25.2 spreading the love
      3. 25.3 Summary