Prototype-Based Programming Features in JavaScript

This section provides a list of some prototype-based programming features in JavaScript, like constructor function, prototype object, object properties and methods.

As I mentioned in the previous section, JavaScript is a prototype-based programming language. It supports object-oriented programming through a number of features:

Several tutorial examples will be provided later in this chapter to illustrate some of those features.

Table of Contents

 About This Book

 Introduction to JavaScript

 ECMAScript Language Specification and JavaScript Dialects

 Data Types, Variables and Expressions

 Flow Control Statements

 Creating, Accessing, and Manipulating Arrays

 Defining and Calling Functions

 Web Browser Supporting JavaScript

 Server-Side and Client-Side Web Scripting

 Introduction to 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

 'jrunscript' - JavaScript Shell Command from JDK

 Using Functions as "Function" Objects

 Introduction to Built-in Object Types

 W3C's Document Object Model (DOM) Specifications

 References

 PDF Printing Version