Module 05 - Functions Flashcards
Function draw() & function setup() are already apart of p5.js so it’s already defined. True or false.
True
What is a user-defined function?
Blocks of code the user creates to be defined and executed in the program
What is the order of the user-defined functions?
- setup()
- draw()
- event functions [e.g. keyPressed()]
- built-in functions
What are parameters?
Variables that are used to pass info into a function
How are parameters helpful?
They allow users to create generalized functions that can work w/ different sets of data
What is a parameter-less function?
Function that does not take any parameters or arguments. When you define the function, there is no variables listed in the parenthesis ‘()’
What is a scope?
A defined portion of your program
What are arguments?
Values that are passed when calling an existing function