Synopses & Reviews
JavaScript is the ubiquitous programming language of the Web, and for more than 15 years, JavaScript: The Definitive Guide has been the bible of JavaScript programmers around the world. Ideal for JavaScript developers at any level, this book is an all-new excerpt of The Definitive Guide, collecting the essential parts of that hefty volume into this slim yet dense pocket reference.
The first 9 chapters document the latest version (ECMAScript 5) of the core JavaScript language, covering:
- Types, values, and variables
- Operators, expressions, and statements
- Objects and arrays
- Functions and classes
The next 5 chapters document the fundamental APIs for using JavaScript with HTML5 and explain how to:
- Interact with web browser windows
- Script HTML documents and document elements
- Modify and apply CSS styles and classes
- Respond to user input events
- Communicate with web servers
- Store data locally on the user's computer
This book is a perfect companion to jQuery Pocket Reference.
Synopsis
JavaScript is the ubiquitous programming language of the Web, and for more than 15 years, JavaScript: The Definitive Guide has been the bible of JavaScript programmers around the world. This book is an all-new excerpt of The Definitive Guide, collecting the essential parts of that hefty volume into this slim yet dense pocket reference.
The first 9 chapters document the latest version (ECMAScript 5) of the core JavaScript language, covering:
Types, values, and variables Operators, expressions, and statements Objects and arrays Functions and classes
The next 5 chapters document the fundamental APIs for using JavaScript with HTML5 and explain how to:
Interact with web browser windows Script HTML documents and document elements Modify and apply CSS styles and classes Respond to user input events Communicate with web servers Store data locally on the user's computer
This book is a perfect companion to jQuery Pocket Reference.
Synopsis
Although JavaScript has become the programming language of the Web, its a little different from the expectations of other languages. This convenient pocket reference gives you immediate answers to pressing questions as you encounter them.
Based on content distilled from David Flanagans bestselling JavaScript: The Definitive Guide, this quick guide to JavaScripts features and quirks is ideal for experienced programmers coming to JavaScript from another environment, as well as developers experienced with the language.
About the Author
David Flanagan is a JavaScript programmer at Mozilla. His books with OReilly include JavaScript: The Definitive Guide, jQuery Pocket Reference, The Ruby Programming Language, and Java in a Nutshell. David has a degree in computer science and engineering from the Massachusetts Institute of Technology. He lives with his wife and children in the U.S. Pacific Northwest between the cities of Seattle, Washington, and Vancouver, British Columbia. David has a blog at http://www.davidflanagan.com/.
Table of Contents
Preface; Chapter 1: Lexical Structure; 1.1 Comments; 1.2 Identifiers and Reserved Words; 1.3 Optional Semicolons; Chapter 2: Types, Values, and Variables; 2.1 Numbers; 2.2 Text; 2.3 Boolean Values; 2.4 null and undefined; 2.5 The Global Object; 2.6 Type Conversions; 2.7 Variable Declaration; Chapter 3: Expressions and Operators; 3.1 Expressions; 3.2 Operators; 3.3 Arithmetic Operators; 3.4 Relational Operators; 3.5 Logical Expressions; 3.6 Assignment Expressions; 3.7 Evaluation Expressions; 3.8 Miscellaneous Operators; Chapter 4: Statements; 4.1 Expression Statements; 4.2 Compound and Empty Statements; 4.3 Declaration Statements; 4.4 Conditionals; 4.5 Loops; 4.6 Jumps; 4.7 Miscellaneous Statements; Chapter 5: Objects; 5.1 Creating Objects; 5.2 Properties; 5.3 Object Attributes; Chapter 6: Arrays; 6.1 Creating Arrays; 6.2 Array Elements and Length; 6.3 Iterating Arrays; 6.4 Multidimensional Arrays; 6.5 Array Methods; 6.6 ECMAScript 5 Array Methods; 6.7 Array Type; 6.8 Array-Like Objects; 6.9 Strings as Arrays; Chapter 7: Functions; 7.1 Defining Functions; 7.2 Invoking Functions; 7.3 Function Arguments and Parameters; 7.4 Functions as Namespaces; 7.5 Closures; 7.6 Function Properties, Methods, and Constructor; Chapter 8: Classes; 8.1 Classes and Prototypes; 8.2 Classes and Constructors; 8.3 Java-Style Classes in JavaScript; 8.4 Immutable Classes; 8.5 Subclasses; 8.6 Augmenting Classes; Chapter 9: Regular Expressions; 9.1 Describing Patterns with Regular Expressions; 9.2 Matching Patterns with Regular Expressions; Chapter 10: Client-Side JavaScript; 10.1 Embedding JavaScript in HTML; 10.2 Event-Driven Programming; 10.3 The Window Object; Chapter 11: Scripting Documents; 11.1 Overview of the DOM; 11.2 Selecting Document Elements; 11.3 Document Structure and Traversal; 11.4 Attributes; 11.5 Element Content; 11.6 Creating, Inserting, and Deleting Nodes; 11.7 Element Style; 11.8 Geometry and Scrolling; Chapter 12: Handling Events; 12.1 Types of Events; 12.2 Registering Event Handlers; 12.3 Event Handler Invocation; Chapter 13: Networking; 13.1 Using XMLHttpRequest; 13.2 HTTP by