Create Empty Object Array Javascript Function