Typescript Get Last Character Of String Javascript Functions W3schools