Javascript Define Object Array Typescript Interview