17. implement LastChar<T>

TypeScript
Is this helpful ?

from all members: - accepted / - tried

Similar to FirstChar<T>, please implment LastChar<T> to get the last character.

type A = LastChar<'BFE'> // 'E'
type B = LastChar<'dev'> // 'v'
type C = LastChar<''> // never

Let's try to solve this problem within 5 mintues.

Discuss(3)