The New Array Method You'll Enjoy: array.at(index)
Read OriginalThis 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.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser