Javascript New Object Array Typescript Interview