Typescript Change Position In Array Javascript Append