Exam-style question
Try this first
Which situation demonstrates a function being used as an argument?.
- A.A function is supplied to another function as one of the values it receives
- B.A function is written as a comment
- C.A function is replaced by a character
- D.A function is used only to display a message
Answer and explanation
Concise answer
A function is written as a comment
Why this is correct
A first-class function can be assigned as an argument, meaning it can be supplied to another function as a value it receives.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
