Get Programming with JavaScript - Contents
-
Part 1 – Core concepts on the console
-
Chapter 1 – Programming, JavaScript and JS Bin
- 1.1 Programming
- 1.2 JavaScript
- 1.3 Learning by doing and thinking
- 1.4 JS Bin
- 1.5 The Crypt: our running example
- 1.6 Further examples and practice
- 1.7 Browser support
- 1.8 Summary
-
Chapter 2 – Variables: storing data in your program
- 2.1 What is a variable?
- 2.2 Declaring variables and assigning values
- 2.3 Choosing good variable names
- 2.4 The Crypt - player variables
- 2.5 Summary
-
Chapter 3 – Objects: grouping your data
- 3.1 A need for organization
- 3.2 Creating objects
- 3.3 Accessing object properties
- 3.4 Updating object properties
- 3.5 Further examples
- 3.6 The Crypt - a player object
- 3.7 Summary
-
Chapter 4 – Functions: code on demand
- 4.1 Noticing repetition
- 4.2 Defining and calling functions
- 4.3 Reducing repetition
- 4.4 Making code easier to read and update
- 4.5 The Crypt - displaying player information
- 4.6 Summary
-
Chapter 5 – Arguments: passing data to functions
- 5.1 Function reuse and versatility
- 5.2 Passing information to functions
- 5.3 The Crypt - displaying player information
- 5.4 Summary
-
Chapter 6 - Return values: getting data from functions
- 6.1 Returning data from functions
- 6.2 Experimenting at the console prompt
- 6.3 The Crypt - building player information strings
- 6.4 Summary
-
Chapter 7 - Object arguments: functions working with objects
- 7.1 Using objects as arguments
- 7.2 Returning objects from functions
- 7.3 Methods: setting functions as properties of objects
- 7.4 The Crypt - player objects as arguments
- 7.5 Summary
-
Chapter 8 – Arrays: putting data into lists
- 8.1 Creating arrays and accessing elements
- 8.2 Array methods
- 8.3 The Crypt - a player items array
- 8.4 Summary
-
Chapter 9 – Constructors: building objects with functions
- 9.1 Using functions to build objects
- 9.2 Using constructor functions to build objects
- 9.3 Building mastery - two examples of constructors
- 9.4 The Crypt - providing places to plunder
- 9.5 The Crypt - streamlining player creation
- 9.6 Summary
-
Chapter 10 – Bracket notation: flexible property names
- 10.1 Using square brackets instead of dots
- 10.2 The Crypt - enhancing exit excitement
- 10.3 The Crypt - let the games begin!
- 10.4 What's next?
- 10.5 Summary
-
Part 2 – Organizing your programs
-
Chapter 11 – Scope: hiding information
- 11.1 The dangers of global variables
- 11.2 The benefits of local variables
- 11.3 Interfaces - controlling access and providing functionality
- 11.4 Creating a quick quiz app
- 11.5 The Crypt - hiding player info
- 11.6 The Crypt - hiding place info
- 11.7 The Crypt - user interaction
- 11.8 Summary
-
Chapter 12 – Conditions: choosing code to run
- 12.1 Conditional execution of code
- 12.2 Generating random numbers with Math.random()
- 12.3 Further conditions with else if
- 12.4 Checking answers in the quiz app
- 12.5 The Crypt - checking user input
- 12.6 Summary
-
Chapter 13 – Modules: breaking a program into pieces
- 13.1 Understanding bins and files on JS Bin
- 13.2 Importing files into other projects
- 13.3 Importing the Number Generator - further examples
- 13.4 Importing multiple files
- 13.5 Collisions - when imported code overwrites your variables
- 13.6 Immediately invoked function expressions (IIFE)
- 13.7 The Crypt - organizing code into modules
- 13.8 Summary
-
Chapter 14 – Models: working with data
- 14.1 Building a fitness app - data and models
- 14.2 The Crypt - separating map data from the game
- 14.3 Summary
-
Chapter 15 - Views: displaying data
- 15.1 Building a fitness app - displaying the latest user data
- 15.2 The Crypt - moving view code from Player and Place
- 15.3 The Crypt - talking to players with a message view
- 15.4 Summary
-
Chapter 16 - Controllers: linking models and views
- 16.1 Building a fitness app - controllers
- 16.2 The Crypt - adding a game controller
- 16.3 The Crypt - the structure of the controller code
- 16.4 The Crypt - starting and stopping the game
- 16.5 The Crypt - giving commands and solving puzzles
- 16.6 The Crypt - running the game
- 16.7 The Crypt - what's next for the app?
- 16.8 Summary
-
Part 3 - JavaScript in the browser
-
Chapter 17 - HTML: building web pages
- 17.1 HTML, CSS, JavaScript - building a web page
- 17.2 HTML - a very short introduction
- 17.3 Adding content to a web page with JavaScript
- 17.4 Displaying data from an array
- 17.5 The Crypt - displaying players and places with web views
- 17.6 Summary
-
Chapter 18 – Controls: getting user input
- 18.1 Working with buttons
- 18.2 Using a select element to choose an option
- 18.3 Reading user input with text boxes
- 18.4 The Crypt - player commands via a text box
- 18.5 Summary
-
Chapter 19 – Templates: filling placeholders with data
- 19.1 Building a news page - breaking news
- 19.2 Replacing one string with another
- 19.3 While loops - replacing a string multiple times
- 19.4 Automating placeholder replacement for templates
- 19.5 Building a news page - news just in
- 19.6 The Crypt - improving the views
- 19.7 Summary
-
Chapter 20 – XHR: loading data
- 20.1 Building a fitness app - retrieving user data
- 20.2 JSON - a simple data format
- 20.3 The Crypt - loading a map on demand
- 20.4 Summary
-
Chapter 21 - Conclusion: get programming with JavaScript
- 21.1 Working locally with files
- 21.2 Getting help
- 21.3 What next?
- 21.4 Summary
-
Part 4 – The server, Node, Express and Socket.io
(online extras)
-
Chapter 22 – Node: running JavaScript outside the browser
- 22.1 Running JavaScript with Node.js
- 22.2 Turning your code into Node modules
- 22.3 Executing JavaScript with the read-eval-print loop
- 22.4 The Crypt - starting a local project
- 22.5 The Crypt - tracking multiple players
- 22.6 The Crypt - controlling players
- 22.7 Summary
-
Chapter 23 – Express: building an API
- 23.1 Installing packages from npm
- 23.2 Creating a web server with Express
- 23.3 Sending data to and from the server
- 23.4 The Crypt - server and client code
- 23.5 The Crypt - building the game server
- 23.6 The Crypt - loading data in the browser
- 23.7 Summary
-
Chapter 24 – Polling: repeating requests with XHR
- 24.1 High Fives - building an auction app
- 24.2 High Fives - polling the server for updates
- 24.3 The Crypt - running a central server
- 24.4 The Crypt - managing multiple games on the browser
- 24.5 The Crypt - managing multiple games on the server
- 24.6 The Crypt - keeping players updated
- 24.7 Summary
-
Chapter 25 – Socket.IO: real-time messaging
- 25.1 sending messages with Socket.IO
- 25.2 spreading the love
- 25.3 Summary