Access last element of a TypeScript array

前端 未结 5 845
走了就别回头了
走了就别回头了 2021-02-06 20:23

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?

5条回答
提交回复
热议问题