πŸ”₯ Use JavaScript’s new array.at():

.at(0) β†’ first item

.at(-1) β†’ last item

It also floors the index, which is handy for random items!

dogs.at(Math.random() * dogs.length)
85413117160
959374120K