I would like to understand something about callbacks! I know there are other topics on the subject, but mine is a simple question that is not clear to me yet.
For example, let's say I have this array:
['Banana', 'Maçã', 'Melancia']
To go through the same I'm going to use forEach with a function and I'll display with console.log
const minhaArray = ['Banana', 'Maçã', 'Melancia'];
function impri(nome, indice){
console.log('${indice + 1}. ${nome}');
}
minhaArray.forEach(impri);
The callback in the case, is it only the impri
function or the callback all together? The function printed from the array and the forEach?