Which one exactly is the Callback function in an Iteration expression

When dealing with Iterations and arrays as in this lesson, which part of the iteration expressions is referred to as the actual callback function?

The callback function in this context is the function defined within the brackets of the array method.

It would take this format:
array.method(callback function)

Many thanks. Does a callback function have other uses aside iterations in arrays?

A callback has many uses but it is mainly used in iterators and event listeners. It can also be used with builtin functions such as sort().

1 Like