Javascript New Object Array Creation Python Interview Question