##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Create reusable code blocks with parameters and return values
What you'll learn
Reusable code blocks
The function keyword
Executing the code
Test your understanding
Inputs to functions
More inputs
The terminology
Test your understanding
Fallback values
Several optional params
Outputs from functions
Early exit
Test your understanding
Implicit undefined
Functions as values
Key differences
Test your understanding
Shorter syntax
Even shorter forms
Test your understanding
Available everywhere
Inside the function
Inside braces
Test your understanding
Passing functions as arguments
Inline functions
Practical example
Test your understanding
Predictable functions
What to avoid
Creating functions
Different syntaxes
Passing functions
Test your understanding
Building operations
Reusable checks
What to avoid
Preparing for strings and numbers
Summary of key concepts