javascript-functions Flashcards
What is a function in JavaScript?
Series of steps that perform an action when called
Describe the parts of a function definition.
Function keyword, name, parameters, arguments, and code block
Describe the parts of a function call.
I don’t know
When comparing them side-by-side, what are the differences between a function call and a function definition?
Definition just defines it and a call actually produces results
When a function is called, the parameters in its definition take on the values of the arguments that were passed.
What is the difference between a parameter and an argument?
A parameter is just a placeholder for input values and arguments are actual input values.
Why are function parameters useful?
I don’t know
What two effects does a return statement have on the behavior of a function?
Stops code.