Typescript Last Index Of String Javascript Methods And Functions