Define a “Callback Function”
A function that is passed into another function as a parameter, then invoked by that other function.
Name the parameters of the ‘forEach’ method
forEach(array, callback)
someArray.forEach(function(element, index, array) {
console.log(item);
});
Name the parameters of the callback function inside the forEach method.
someArray.forEach(function(element, index, array) {
console.log(element);
});
What does the the ‘findIndex’ method do?
It returns the index of the first element in the array for which the callback returns a truthy value. ‘-1’ is returned if the callback never returns a truthy value.
Define how ‘the Stack’ is set up and how it works.
Define ‘the Heap’