Visit Mozilla.org

Core JavaScript 1.5 Guide

From MDC


Contents

[edit] About this Guide

New features in JavaScript versions
What you should already know
JavaScript versions
Where to find JavaScript information
Tips for learning JavaScript
Document conventions

[edit] JavaScript Overview

What is JavaScript?
JavaScript and Java
JavaScript and the ECMAScript Specification
Relationship between JavaScript Versions and ECMAScript Editions
JavaScript Documentation versus the ECMAScript Specification
JavaScript and ECMAScript Terminology

[edit] Core Language Features

Values
Data Type Conversion
Variables
Declaring Variables
Evaluating Variables
Variable Scope
Global Variables
Constants
Literals
Array Literals
Boolean Literals
Floating-Point Literals
Integers
Object Literals
String Literals
Unicode
Unicode Compatibility with ASCII and ISO
Unicode Escape Sequences
Unicode characters in JavaScript files
Displaying Characters with Unicode

[edit] Expressions and Operators

Expressions
Operators
Assignment Operators
Comparison Operators
Arithmetic Operators
Bitwise Operators
Logical Operators
String Operators
Special Operators
Operator Precedence

[edit] Regular Expressions

Creating a Regular Expression
Writing a Regular Expression Pattern
Using Simple Patterns
Using Special Characters
Using Parentheses
Working with Regular Expressions
Using Parenthesized Substring Matches
Executing a Global Search, Ignoring Case, and Considering Multiline Input
Examples

[edit] Statements

Block Statement
Conditional Statements
if...else Statement
switch Statement
Loop Statements
for Statement
do...while Statement
while Statement
label Statement
break Statement
continue Statement
Object Manipulation Statements
for...in Statement
with Statement
Comments
Exception Handling Statements
throw Statement
try...catch Statement

[edit] Functions

Defining Functions
Calling Functions
Using the arguments Object
Predefined Functions
eval Function
isFinite Function
isNaN Function
parseInt and parseFloat Functions
Number and String Functions
escape and unescape Functions
Working with Closures

[edit] Working with Objects

Objects and Properties
Creating New Objects
Using Object Initializers
Using a Constructor Function
Indexing Object Properties
Defining Properties for an Object Type
Defining Methods
Using this for Object References
Defining Getters and Setters
Deleting Properties
Predefined Core Objects
Array Object
Boolean Object
Date Object
Function Object
Math Object
Number Object
RegExp Object
String Object
Inheritance

[edit] Working with Arrays

Creating an array
Working with array elements
Understanding length
Iterating over arrays
Array methods
Working with Array-like objects
Two-Dimensional Arrays
Array comprehensions

[edit] Iterators and Generators

Iterators
Defining custom iterators
Generators: a better way to build Iterators
Advanced generators
Generator expressions

[edit] Details of the Object Model

Class-Based vs. Prototype-Based Languages
Defining a Class
Subclasses and Inheritance
Adding and Removing Properties
Summary of Differences
The Employee Example
Creating the Hierarchy
Object Properties
Inheriting Properties
Adding Properties
More Flexible Constructors
Property Inheritance Revisited
Local versus Inherited Values
Determining Instance Relationships
Global Information in Constructors
No Multiple Inheritance

[edit] LiveConnect Overview

Working with Wrappers
JavaScript to Java Communication
The Packages Object
Working with Java Arrays
Package and Class References
Arguments of Type char
Handling Java Exceptions in JavaScript
Java to JavaScript Communication
Using the LiveConnect Classes
Data Type Conversions
JavaScript to Java Conversions
Java to JavaScript Conversions

[edit] Processing XML with E4X

Compatibility issues
Creating an XML object
Working with attributes
Working with XML objects
Working with XMLLists
Searching and filtering
Handling namespaces


Next »