What is a higher-order function in JavaScript?

  • A function that takes another function as an argument.
  • A function that operates on other functions, either by taking them as arguments or by returning them.
  • A function that only performs operations on numbers.
  • A function that can only be called once.
In JavaScript, a higher-order function is one that either takes a function as an argument or returns a function. This allows for the creation of more flexible and reusable code.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *