Flow Control Statements

This chapter provides a quick introduction of JavaScript flow control statements. Topics include 'if...then' statements, 'while' statements, 'for' statements, 'break' statements, etc..

What Is a Statement?

Conditional "if" Statements

Conditional "if" Statement Examples

"switch ... case" Statements

"switch ... case" Statement Example

"for" Loop Statements

"for" Loop Statement Example

"while" Loop Statements

"while" Loop Statement Example

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

 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