This is the description for the arguments accepted by Callback functions. It has been explained multiple times throughout the course but causes more confusion than clarity.
The callback function accepts three arguments. The first argument is the current element being processed. The second is the index of that element and the third is the array upon which the
filter method was called.
See below for an example using the
filter method on the
users array to return a new array containing only the users under the age of 30. For simplicity, the example only uses the first argument of the callback.
(It would be appreciated if the upper paragraph had an example of utilizing the three arguments.)