Typescript Change Position In Array Javascript Methods