Functions Flashcards
1
Q
What does a function ‘take’
A
arguments
2
Q
The result of a function is called the….
A
return value
3
Q
A function that returns something is called
A
fruitful
4
Q
A function that doesn’t return anything is called
A
void / non fruitful
5
Q
What does a function definition do?
A
Specifies the name of a new function
6
Q
What does defining a function do?
A
Creates a function object
7
Q
What is the type of a function?
A
function
8
Q
What is a variable called when passed to a function?
A
parameters
9
Q
Give 3 reasons why you would use functions?
A
Allows you to collect a block of functionality together
Allows you to reduce duplicate code
Helpful for debugging.