r/learnjavascript • • Oct 26 '21

Negative array indexing using "at" method

Post image
203 Upvotes

69 comments sorted by

View all comments

1

u/delventhalz Oct 26 '21

This is nice, but I kind of just want a last method. That would solve 99% of the use cases I might use at for.

While I’m at it, head and tail would be nice too (though brackets/slice work well enough for those).

4

u/_inz_ Oct 26 '21

Miss this so much coming from Swift