Array at()Baseline · Widely available
The at() method of arrays and typed arrays returns the item at an index, including negative indices for getting items relative to the end of an array. Also known as the relative indexing method.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Mar 14, 2022. Widely available since Sep 14, 2024.
Browser support
DesktopChrome
1–91Not supported
92+Supportedsince Jul 20, 2021
Current: 155Edge
12–91Not supported
92+Supportedsince Jul 22, 2021
Current: 154Firefox
1–89Not supported
90+Supportedsince Jul 13, 2021
Current: 157Safari
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27MobileChrome Android
18–91Not supported
92+Supportedsince Jul 20, 2021
Current: 155Firefox Android
4–89Not supported
90+Supportedsince Jul 13, 2021
Current: 157Safari iOS
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
JS
const items = ["a", "b", "c"]; items.at(0); // "a" items.at(-1); // "c" — last item, no items[items.length - 1]
Feature detection
JS · check before using
if ("at" in Array || ("prototype" in Array && "at" in Array.prototype)) {
// Array.at is available
}Specification
Sub-features
Support for each part of the feature (2). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Array.at | 92 | 92 | 90 | 15.4 | 92 | 90 | 15.4 |
| TypedArray.at | 92 | 92 | 90 | 15.4 | 92 | 90 | 15.4 |