JavaScript Tutorials
JavaScript Tutorials
http://www.herongyang.com/JavaScript
This free book is a collection of tutorial examples and notes written by the author while he was learning JavaScript. Topics include data type, variable, expression, statement, loop, user function, object, property, method, array.
Table of Contents
About This JavaScript Tutorial Example Book
First JavaScript - "Hello World!"
Walking through the First JavaScript
Data Types, Variables and Expressions
Primitive Data Types - Numbers, Strings, and Booleans
Declaring Variables - "var" Statements
Operators and Expressions - Examples
Conditional "if" Statement Examples
"switch ... case" Statement Example
"while" Loop Statement Example
Creating, Accessing, and Manipulating Arrays
Accessing Array Elements with Indexes
Truncating and Iterating Array Elements
Array Object Instance Method Examples
Defining and Calling Functions
Defining Your Own Functions - Example
Calling Your Own Functions - Example
Passing Parameters by Value or by Reference
Function Parameters Are Passed as Local Copies
Function Parameters Are Passed as Local Copies - Example
Global and Local Variables - Scope Rules
Collision of Global and Local Variables - Examples
"return" Statement and Return Value
Web Browser Supporting JavaScript
JavaScript Support Introduction
Including JavaScript Codes with HTML "script" Tags
Including JavaScript Codes as External Files
DOM API - The "document" Object
Adding and Deleting Object Own Properties
Adding and Deleting Object Own Methods
Using "this" Keyword to Represent Current Object
Object Literals of the "Object" Type
Objects with Indexed Properties
Differences between "Object" and "Array"
Using "Array" Objects as "Object" Objects
Defining Your Own Object Types
Prototype-Dased Object-Oriented Programming Style
Prototype-Based Programming Features in JavaScript
Defining Object Constructor Functions
Adding Properties and Methods to Objects
"for ... in" and "for each ... in" Statements
"prototype" Property of the Constructor Function Object
"instanceof" Operator - Determining Object Type
"typeof" Operator and Data Types
Inheritance of Properties and Methods through the Prototype Object Chain
Inheriting from Constructor's Prototype Object
Changing the Constructor's Prototype Object
Inheriting Properties from Two Level Prototype Objects
Built-in Properties and Methods in "Object.prototype"
Using "hasOwnProperty()" Method to Test Inherited Properties
Setting the "constructor" Property in the "prototype" Object
Adding Local Methods at the Object Level
Adding Inherited Methods at the Prototype Level
Building Multiple Levels of Prototype Objects
Labels: JavaScript, Tutorials