Fix Uncaught Typeerror Foreach Is Not A Function Error In Javascript

Fix Uncaught Typeerror Foreach Is Not A Function Error In Javascript