Chapter 10: Functions Are at Your Beck and Call
Learning Objectives
- Understand the role of functions in making code modular and reusable
- Create programmer-defined functions
- Explain what a function is
- Write a function with no parameters, a single parameter, and multiple parameters
- Call a function, with and without parameters
- Understand the behavior of parameters that are not provided by the caller
- Use a
return
statement to complete execution of a function - Use a
return
statement to provide a value to the function caller - Explain what a
return
statement does - Understand variable scope as it pertains to functions
- Explain what variable shadowing is
- Write a function that calls another function
- Use properly descriptive names when defining functions
Key Terminology
Introduction
- function
- method
indexOf
- encapsulation
Creating Functions
- TypeScript
- abstraction
Parameters and Variables
- scope
Content Links