What is a function in JavaScript?
group of actions that are repeatable
Describe the parts of a function definition.
function keyword, optional function name, parenthesis (to pass on parameters) , opening braces, code block, and within the code block we have return statements and closing braces
Describe the parts of a function call.
function name with parenthesis (includes arguments).
When comparing them side-by-side, what are the differences between a function call and a function definition?
What is the difference between a parameter and an argument?
There are no values in parameters (It is still a variable),
The value only comes when that function is called.
The value is the argument.
Why are function parameters useful?
We get to use it many times, and also pass different argument as values. (mutability –> piece of function that can vary depending on the argument that is passed on).
What two effects does a return statement have on the behavior of a function?
2. Can see the value in our program.