Java Create New Object Array In Js For Loop