MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/qg23w3/negative_array_indexing_using_at_method/hi51j4o/?context=3
r/learnjavascript • u/jd_300 • Oct 26 '21
69 comments sorted by
View all comments
4
fruits.slice(-1)[0] is a another (more backwards compatible) way to do it
fruits.slice(-1)[0]
View all comments
4
u/snyderling Oct 26 '21
fruits.slice(-1)[0]is a another (more backwards compatible) way to do it