Typescript Array Shift Javascript Interview Questions