Iteration - callback function

Is the method .forEach seen as a function since the function printFruits is seen as a callback function?

const fruits = ['mango', 'papaya', 'pineapple', 'apple'];

// Iterate over fruits below
fruits.forEach(function printFruits(fruit) { 
  console.log('I want to eat a ' + fruit);

Yes, .forEach is still a function (more specifically, a method for arrays)
but one of the arguments is the callback function.

Methods are a type of function.

Thanks for explaning.
It gets a little confusing if you don’t know that you’re supposed to see it as some sort of a function though it is a method for an array.