How to fix forEach is not a function Error in JavaScript

How to fix forEach is not a function Error in JavaScript