A function pased as an argument to a higher-order function is called a callback function. A callback function is often called during an operation, so it is named Callback, which refers to a call that answers a missed call.
'Function returning a function' has a different term as it has an unusual shape. Curry functions are named after the logician Haskell Curry, who invented 'functions that return functions.' When the term curry function is used seperately, the term higher-order function is sometimes used only for 'functions that take functions as arguments.' Both 'functions that return a function' and 'functions that take functions as arguments' are higher-order functions.
In other words, a higher-order function is a superordinate concept of a callback function and a curry function.
The caller function that receives the callback function can invoke this callback funtion inside the function. The caller can decide whether to execute the callback function based on a condition. It may not be called at all, or it may run multiple times. In the future, you will often come across a case where it will be called after the completion of a specific task.
There was a time when array methods were not natively supported by browsers. At this time, the senior developers created a library for manipulating arrays or objects in a better way, that is, a set of tools for manipulating arrays and objects. In this sprint, you can learn in detail from the principle of implementing Underbar, a library that handles arrays and objects, and how JavaScript built-in methods utilize the callback function.
The above sprint will be worked on with my pair this coming Saturday and I will be back for feedbacks and reviews on the sprint. Can't wait for it!