Last of Array medium #array

by Anthony Fu @antfu

Take the Challenge    简体中文 日本語 한국어

> TypeScript 4.0 is recommended in this challenge Implement a generic `Last` that takes an Array `T` and returns its last element. For example ```ts type arr1 = ['a', 'b', 'c'] type arr2 = [3, 2, 1] type tail1 = Last // expected to be 'c' type tail2 = Last // expected to be 1 ```
Back Share your Solutions Check out Solutions

Related Challenges

14・First of Array 16・Pop