The method takes an integer value and returns the item at that index. Negative integers count back from the last item in the array. The value can be either a positive or negative integer.

5m read timeFrom freecodecamp.org
Post cover image
Table of contents
Syntax of the at() MethodHow JavaScript's at() Method WorksProblems the at() Method SolvesBrowser Support for at()Summary
6 Comments

Sort: