JS-Functions Flashcards
1
Q
What is a function?
A
Holds code that we can reuse
2
Q
Describe function defintion
A
function, functionName, (parameters if any) {
}
3
Q
Describe parts of function call
A
functionName(arguments)
4
Q
difference between parameter and argument
A
parameter is placeholder for when declaring a function
5
Q
why are function parameters useful?
A
They are able to hold placeholder data that serve as blueprint for the function
6
Q
what 2 effects does return statemtent have in functions
A
returns a value, stops code from running