FrontendDeveloper.in

JavaScript question detail

What are the examples of built-in higher order functions?

There are several built-in higher order functions exists on arrays, strings, DOM and promise methods in javascript. These higher order functions provides significant level of abstraction. The list of functions on these categories are listed below,

  1. arrays: map, filter, reduce, sort, forEach, some etc.
  2. DOM: The DOM method element.addEventListener(type, handler) also accepts the function handler as a second argument.
  3. Strings: replace() method.
Back to all JavaScript questions
Get LinkedIn Premium at Rs 399