Typed array iteration methodsBaseline · Widely available
Typed array iteration methods
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 20, 2016. Widely available since Mar 20, 2019.
Browser support
DesktopChrome
1–44Not supported
45+Supportedsince Sep 1, 2015
Current: 155Edge
12+Supportedsince Jul 29, 2015
Current: 154Firefox
1–37Not supported
38+Supportedsince May 12, 2015
Current: 157Safari
1–9.1Not supported
10+Supportedsince Sep 20, 2016
Current: 27MobileChrome Android
18–44Not supported
45+Supportedsince Sep 1, 2015
Current: 155Firefox Android
4–37Not supported
38+Supportedsince May 12, 2015
Current: 157Safari iOS
1–9.3Not supported
10+Supportedsince Sep 13, 2016
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: every.
Feature detection
JS · check before using
// Syntax can't be tested with an if-statement — an unsupported
// browser fails to parse the whole script. Either transpile for older
// targets (e.g. Babel/TypeScript/esbuild), or probe in isolation:
let supported = true;
try {
new Function("/* code that uses the syntax */");
} catch {
supported = false;
}This is a language syntax feature.
Documentation (MDN)
Specification
- tc39.es#sec-%25typedarray%25.prototype.every ↗
- tc39.es#sec-%25typedarray%25.prototype.filter ↗
- tc39.es#sec-%25typedarray%25.prototype.foreach ↗
- tc39.es#sec-%25typedarray%25.prototype.indexof ↗
- tc39.es#sec-%25typedarray%25.prototype.lastindexof ↗
- tc39.es#sec-%25typedarray%25.prototype.map ↗
- tc39.es#sec-%25typedarray%25.prototype.reduce ↗
- tc39.es#sec-%25typedarray%25.prototype.reduceright ↗
- tc39.es#sec-%25typedarray%25.prototype.some ↗
Sub-features
Support for each part of the feature (9). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| TypedArray.every | 45 | 12 | 37 | 10 | 45 | 37 | 10 |
| TypedArray.filter | 45 | 12 | 38 | 10 | 45 | 38 | 10 |
| TypedArray.forEach | 45 | 12 | 38 | 10 | 45 | 38 | 10 |
| TypedArray.indexOf | 45 | 12 | 37 | 10 | 45 | 37 | 10 |
| TypedArray.lastIndexOf | 45 | 12 | 37 | 10 | 45 | 37 | 10 |
| TypedArray.map | 45 | 12 | 38 | 10 | 45 | 38 | 10 |
| TypedArray.reduce | 45 | 12 | 37 | 10 | 45 | 37 | 10 |
| TypedArray.reduceRight | 45 | 12 | 37 | 10 | 45 | 37 | 10 |
| TypedArray.some | 45 | 12 | 37 | 10 | 45 | 37 | 10 |