Delete Last Array Javascript Join Method In Typescript