Is there a notation to access the last element of an array in TypeScript? In Ruby I can say: array[-1]. Is there something similar?
array[-1]
Here is another way which has not yet been mentioned:
items.slice(-1)[0]