Back to Lo

Core Last

docs/data/core-last.md

1.53.0129 B
Original Source

Returns the last element of a collection and whether it exists.

go
v, ok := lo.Last([]int{1, 2, 3})
// v == 3, ok == true