Courses / JavaScript
90. Array.prototype.at()
Returns the element at the specified index, allowing for negative indexing.
1 min read Chapter 90 of 99
JavaScript
Array.prototype.at()
Array.prototype.at() retrieves an element from an array, allowing for negative indexing.
"I often need to access elements from the end of an array without calculating the index."
Array.prototype.at() returns the element at a specified index, and supports negative indices to count from the end of the array.
"I often need to access elements from the end of an array without calculating the index."
Array.prototype.at() returns the element at a specified index, and supports negative indices to count from the end of the array.