Javascript Object Array Foreach Js Syntax Checker