Search
Contents
11.
More on Functions
11.
More on Functions
ΒΆ
11.1. Functions as Values
11.1.1. Functions Are Data
11.2. Anonymous Functions
11.2.1. Anonymous Function Variables
11.2.2. Check Your Understanding
11.3. Passing Functions as Arguments
11.3.1. Example:
setTimeout
11.3.2. Example: The Array Method
map
11.3.3. Check Your Understanding
11.4. Receiving Function Arguments
11.4.1. Example: A Generic Input Validator
11.4.2. Example: A Logger
11.4.2.1. A Simple Logger
11.4.2.2. A More Complex Logger
11.4.3. A Word of Caution
11.5. Why Use Anonymous Functions?
11.5.1. Anonymous Functions Can Be Single-Use
11.5.2. Anonymous Functions Are Ubiquitous in JavaScript
11.5.3. Check Your Understanding
11.6. Recursion
11.6.1. Quick Review
11.6.1.1. Functions Can Call Other Functions
11.6.2. What Is Recursion?
11.7. Recursion Walkthrough: The Base Case
11.7.1. Joining Array Elements With a Loop
11.7.2. Bring In Recursion Concepts
11.7.3. Identifying the Base Case
11.7.4. The Case for the Base
11.7.5. Check Your Understanding
11.8. Making A Function Call Itself
11.8.1. A Visual Representation
11.8.2. A Function Calls Itself
11.8.3. Check Your Understanding
11.9. Recursion Wrap-Up
11.9.1. Recursion in a Nutshell
11.9.2. Why Do I Need To Know Recursion?
11.10. Exercises: More on Functions
11.10.1. Practice Your Skills
11.10.2. Raid a Shuttle
11.11. Studio: More Functions
11.11.1. Sort Numbers For Real
11.11.1.1. Part A: Find the Minimum Value
11.11.1.2. Part B: Create a New Sorted Array
11.11.2. More on Sorting Numbers
11.11.3. Part C: Number Sorting the Easy Way
11.11.4. So Why Write A Sorting Function?
11.11.5. Bonus Mission
←
10.11.
Studio: Functions
11.1.
Functions as Values
→