forEach doesn’t return anything index has value of undefined
anyway, forEach is a method, it is being called where you wrote it, with a function as argument
like push for example, you write arr.push(1) and it adds the 1 to the array
when you use the round parenthesis after a function or method, you are calling it and it is being executed there
now, returning to index
delete it, forEach is a fancy way to write a loop, it doesn’t return anything
you should just write array.forEach(...) in a line on its own