SUMMARY
Containers Summary
Below is a summary of all of the programming constructs discussed in this app:
Data Containers
- Variable – is a container for a SINGLE data type
- Array – is a container for MULTIPLE data types
- Property – is a container to STORE variables of an object
Looping Containers
- For Loop – is a container to REPEAT lines of code
- While / Do While Loop – is a container to REPEAT lines of code
- For…In / For…Each Loop – is a container to REPEAT lines of code for an object or an array???
Action Containers
- Function – is a container for a calculation of numbers or a concatenation of strings or to perform a series of steps (a recipe maker)
- Method – is a container to STORE a function of an object
- Event – is a container to define a TRIGGER for an object
Condition Containers
- If Statements – is a container to TEST if a SINGLE condition is true
- If / Else Statement – is a container to TEST IF a condition is TRUE else do something ELSE
- Switch Statement – is a container to TEST for MULTIPLE conditions
Blueprint / Object Containers
- Classe – is a container to DEFINE properties and methods of an object
- Prototype – is a container DEFINE properties and methods of an object (JavaScript only)
- Object – is a container for to DESIGN an object based on a class or prototype (blueprint)
Trigger Containers
- Event – is a container to define a TRIGGER for an object
- Event Listener / Handler – is a container to ATTACH an event to an object
- Event Object – is a container to CAPTURE property of an object
Content of a container is contained within a set (pair) of:
- Square brackets: “[ … ]” (e.g., an array)
- Curly braces: “{ ... }” (e.g., an object)
- Parenthesis: “(...)” (e.g., a function, method, loop, conditional statement, etc.)