Table of Contents
6.1 Types of Statements
Conceptually speaking, there are five core types of
statements:
- Statements that control the execution flow of a program
-
- loops
- conditionals
- ifFrameLoaded
- Statements that declare variables
-
- var
- set
- Statements that declare, call, and return values from functions
-
- function
- function call
- return
- Statements that deal with objects
-
- with
- for . . . in
- Statements that represent a data value
-
- any expression (especially expressions with side effects)
These informal categories help us understand what we can tell the
interpreter to do using statements. At first glance, the list may
seem fairly limited. However, we'll see that there
are many variations of conditionals and loops and that there are
thousands of things we can do with function calls. First,
let's see how statements are formed.
|
Table of Contents