Transform Slice In Angular Typescript Interview