Introducing the at() Method for JavaScript Arraysby@imsabir
320 reads

Introducing the at() Method for JavaScript Arrays

tldt arrow
Read on Terminal ReaderPrint this storyRead this story w/o Javascript

Too Long; Didn't Read

ECMA2022 brings a new method for us i.e., at(index), you can get the element at the provided index. This method can be used for getting any index value. For example, if you do fruits.at(-1) then it will give you the last element of fruit. with the normal array, the method it's not possible to do.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Introducing the at() Method for JavaScript Arrays
Mohammed HackerNoon profile picture

@imsabir

Mohammed

About @imsabir
LEARN MORE ABOUT @IMSABIR'S EXPERTISE AND PLACE ON THE INTERNET.
react to story with heart
Mohammed HackerNoon profile picture
by Mohammed @imsabir.I am a web developer with expertise in cutting edge technologies, technical writer, technical recruiter.
Read My Stories

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa