Dmitri Pavlutin 1/12/2021

The New Array Method You'll Enjoy: array.at(index)

Read Original

This article explains the JavaScript array.at(index) method, a new proposal that allows accessing array elements with positive and negative indices. It details the limitations of the traditional bracket notation and demonstrates how array.at() simplifies accessing elements from the end of an array, such as getting the last item with a simple negative index.

The New Array Method You'll Enjoy: array.at(index)

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week