Skip to content

Call Back Functions

IT Notes → Javascript @ December 22, 2020

  • Syntax: callback_functions(element, index, and array).
  • the filter method ensures that elements are not added to any element unless they pass certain criteria.
  • The forEach method takes a function that’s then processed against each element.
  • Every method runs the callback function against every element in the array until one returns a false value.
  • The map method runs the callback function against all the array elements and creates a new array from the results.
  • Some method is the opposite of every, in that it runs the callback function against every element until one returns a true value.
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x