How to solve this problem in TS? I am new in TS.
Blockquote
function foo ( arg : T[]) : T[] { let newArr : T[] = [] for( let i