O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The JavaScript Programming Language

Book Description

The JavaScript Programming Language provides a brief introduction to the JavaScript language that is now an important component of every programmers tool box. It offers an overview of JavaScript to students interested in pursuing advanced programming skills. Clear and Concise, The JavaScript Programming Language is an excellent primer to this popular dynamic language and is ideal for use on its own or when coupled with one of Jones and Bartlett's outstanding introductory computer science texts.

Table of Contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Contents
  5. About this Book
  6. 1 - Introduction
    1. 1.1 - Why JavaScript?
    2. 1.2 - Writing and Running JavaScript
      1. 1.2.1 - JavaScript URLs
      2. 1.2.2 - JavaScript Scratch Pages
      3. 1.2.3 - JavaScript Files
      4. 1.2.4 - Comments
    3. 1.3 - Your First Nontrivial Script
    4. 1.4 - One More Nontrivial Script*
    5. Chapter Summary
    6. Exercises
  7. 2 - Basic JavaScript
    1. 2.1 - Expressions
      1. 2.1.1 - Booleans
      2. 2.1.2 - Numbers
      3. 2.1.3 - Strings
      4. 2.1.4 - Type Conversion
    2. 2.2 - Variables
    3. 2.3 - Arrays
    4. 2.4 - Statements
      1. 2.4.1 - The Declaration Statement
      2. 2.4.2 - The Expression Statement
      3. 2.4.3 - Conditional Execution
      4. 2.4.4 - Loops
    5. Chapter Summary
    6. Exercises
  8. 3 - Functions
    1. 3.1 - Function Definitions and Function Calls
    2. 3.2 - Variable Scope
    3. 3.3 - Function Statements
    4. 3.4 - Functions as Arguments to Functions
    5. 3.5 - Functions Returned from Functions*
    6. Chapter Summary
    7. Exercises
  9. 4 - Objects
    1. 4.1 - Object Notation
    2. 4.2 - Object Values
    3. 4.3 - Prototypes
    4. 4.4 - Constructors
    5. 4.5 - Native, Built-In, and Host Objects
    6. 4.6 - Regular Expressions*
    7. 4.7 - The Global Object
    8. Chapter Summary
    9. Exercises
  10. 5 - Interaction
    1. 5.1 - Phone Numbers Revisited
    2. 5.2 - Dynamic HTML
      1. 5.2.1 - The Document Is “Just” a Built-In Object
      2. 5.2.2 - Elements and IDs for Fun and Profit
      3. 5.2.3 - Events
      4. 5.2.4 - Packaging a Dynamic HTML Website
      5. 5.2.5 - Other Related Built-In Objects
      6. 5.2.6 - Timed or Ongoing Activity
    3. 5.3 - Introduction to Ajax
      1. 5.3.1 - Ajax in Action
      2. 5.3.2 - The Secret Ingredient: XMLHttpRequest
      3. 5.3.3 - Processing Responses
      4. 5.3.4 - Overall Ajax Structure
      5. 5.3.5 - Where's the XML?
    4. Chapter Summary
    5. Exercises
  11. Afterword
  12. Book Website Guide
  13. Glossary
  14. Bibliography
  15. Index