LearnFrenzy
Sign in Take a free test

Functions · JavaScript Functions MCQ · Question 7

Higher-order functions Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 7 Back to Exercise

Which of these is a higher-order function?

  • A A function declared at the top of a file
  • B A function with more than three parameters
  • C A function that takes a function as an argument or returns a function Correct
  • D A function that calls itself
Correct Answer: Option C

map, filter, reduce, setTimeout and function factories are higher-order. A function that calls itself is recursive.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links