Table of contents
- 1. Quick Table of Contents
-
2. Expanded Table of Contents
- 2.1. About this Guide
- 2.2. JavaScript Overview
- 2.3. Values, variables, and literals
- 2.4. Expressions and operators
- 2.5. Regular Expressions
- 2.6. Statements
- 2.7. Functions
- 2.8. Working with objects
- 2.9. Predefined Core Objects
- 2.10. Details of the object model
- 2.11. Inheritance revisited
- 2.12. Iterators and generators
- 2.13. Closures
- 2.14. LiveConnect Overview
- 2.15. Processing XML with E4X
Quick Table of Contents
- About this Guide
- JavaScript Overview
- Values, variables, and literals
- Expressions and operators
- Regular Expressions
- Statements
- Functions
- Working with objects
- Predefined Core Objects
- Details of the object model
- Inheritance revisited
- Iterators and generators
- Closures
- LiveConnect Overview
- Processing XML with E4X
Expanded Table of Contents
About this Guide
- 1. New features in JavaScript versions
- 2. What you should already know
- 3. JavaScript versions
- 4. Where to find JavaScript information
-
5. Tips for learning JavaScript
- 5.1. An interactive interpreter
- 5.2. Firebug
- 6. Document conventions
JavaScript Overview
- 1. What is JavaScript?
- 2. JavaScript and Java
-
3. JavaScript and the ECMAScript Specification
- 3.1. Relationship between JavaScript Versions and ECMAScript Editions
- 3.2. JavaScript Documentation versus the ECMAScript Specification
- 3.3. JavaScript and ECMAScript Terminology
Values, variables, and literals
-
1. Values
- 1.1. Data type conversion
-
1.2. Converting strings to numbers
- 1.2.1. parseInt() and parseFloat()
- 1.2.2. Plus operator
-
2. Variables
- 2.1. Declaring variables
- 2.2. Evaluating variables
- 2.3. Variable scope
- 2.4. Global variables
- 2.5. See also
- 3. Constants
-
4. Literals
-
4.1. Array literals
- 4.1.1. Extra commas in array literals
- 4.2. Boolean literals
- 4.3. Integers
- 4.4. Floating-point literals
- 4.5. Object literals
-
4.6. String literals
- 4.6.1. Using special characters in strings
- 4.6.2. Escaping characters
-
4.1. Array literals
-
5. Unicode
- 5.1. Unicode compatibility with ASCII and ISO
- 5.2. Unicode escape sequences
- 5.3. Unicode characters in JavaScript files
- 5.4. Displaying characters with Unicode
Expressions and operators
- 1. Expressions
-
2. Operators
- 2.1. Assignment operators
- 2.2. Comparison operators
- 2.3. Arithmetic operators
-
2.4. Bitwise operators
- 2.4.1. Bitwise logical operators
- 2.4.2. Bitwise shift operators
-
2.5. Logical operators
- 2.5.1. Short-circuit evaluation
- 2.6. String operators
-
2.7. Special operators
- 2.7.1. Conditional operator
- 2.7.2. Comma operator
- 2.7.3. delete
- 2.7.4. in
- 2.7.5. instanceof
- 2.7.6. new
- 2.7.7. this
- 2.7.8. typeof
- 2.7.9. void
- 2.8. Operator precedence
Regular Expressions
- 1. Creating a Regular Expression
-
2. Writing a Regular Expression Pattern
- 2.1. Using Simple Patterns
- 2.2. Using Special Characters
- 2.3. Using Parentheses
-
3. Working with Regular Expressions
-
3.1. Using Parenthesized Substring Matches
- 3.1.1. Example 1
- 3.2. Advanced Searching With Flags
-
3.1. Using Parenthesized Substring Matches
-
4. Examples
- 4.1. Changing the Order in an Input String
- 4.2. Using Special Characters to Verify Input
Statements
- 1. Block Statement
-
2. Conditional Statements
- 2.1. if...else Statement
- 2.2. switch Statement
-
3. Loop Statements
- 3.1. for Statement
- 3.2. do...while Statement
- 3.3. while Statement
- 3.4. label Statement
- 3.5. break Statement
- 3.6. continue Statement
-
4. Object Manipulation Statements
- 4.1. for...in Statement
- 4.2. for each...in Statement
- 5. Comments
-
6. Exception Handling Statements
- 6.1. Exception Types
- 6.2. throw Statement
-
6.3. try...catch Statement
- 6.3.1. The catch Block
- 6.3.2. The finally Block
- 6.3.3. Nesting try...catch Statements
- 6.4. Utilizing Error objects
Functions
- 1. Defining functions
- 2. Calling functions
- 3. Function scope
- 4. Closures
- 5. Using the arguments object
-
6. Predefined functions
- 6.1. eval Function
- 6.2. isFinite function
- 6.3. isNaN function
- 6.4. parseInt and parseFloat functions
- 6.5. Number and String functions
- 6.6. escape and unescape functions
Working with objects
- 1. Objects overview
- 2. Objects and properties
- 3. Object everything
- 4. Enumerating all properties of an object
-
5. Creating new objects
- 5.1. Using object initializers
- 5.2. Using a constructor function
- 5.3. Using the Object.create method
- 5.4. Inheritance
- 5.5. Indexing object properties
- 5.6. Defining properties for an object type
- 5.7. Defining methods
- 5.8. Using this for object references
-
5.9. Defining getters and setters
- 5.9.1. Obsolete syntaxes
- 5.9.2. Summary
- 5.9.3. See also
- 5.10. Deleting properties
- 6. See also