Consider this array and function:
let names = ["Greg", "Mike", "Tom"];
names.forEach(function(item, index){
console.log(index, item)//will print out index in array, and item in that index.
});
Sorry, but it doesn’t make much sense to me how this works. Could someone explain?