What is a function?: A named and self-contained piece of code that may be executed (i.e. called) many times.
Why use functions?
Syntax:
reurnType functionName(arguments) {
// code body
}
For now, we will have a "void" return type and no arguments:
void functionName() {
// code body
}
What is the difference between defining vs calling (i.e. executing) a function.
What is the order of execution?
Scope: Where is a variable recognized? Depends on where it is declared. Look at colored regions of these programs: