Typescript Change Index In Array In C