Functions Flashcards
Function definition
A segment of code that creates a function, including its names, and code, to be used by other portions of the program.
Parameter
A variable for which a function expects to receive a value when called, whose scope is the function’s own execution.
Function Header
The name and list of parameters a function expects, provided as reference to the rest of the program to use when calling the function.
Function Body
The code that a function runs when called.
Return Stament
The line of code that defines what output will be sent back at the end of a function.
Arguments
Values passed into parameters during a function call. Essentially, these are the values assigned to the function’s dedicated variables (i.e., parameters)
return (ending the function early)
When a function runs a line with a return statement, it immediately ends the function and send the result back