Typescript Array Get Last Element Of String