Typescript Change Index In Array Javascript Append W3schools