Array includes()
Widely available since 2019-03-20
The includes()
method of arrays and typed arrays returns whether a given value appears in the array.
Learning resources on MDN
Browser support
- Chrome 47 Released on 2015-12-01
- Chrome Android 47 Released on 2015-12-02
- Edge 14 Released on 2016-08-02
- Firefox 43 Released on 2015-12-15
- Firefox for Android 43 Released on 2015-12-15
- Safari 10 Released on 2016-09-20
- Safari on iOS 10 Released on 2016-09-13
Specifications
- ECMAScript Language Specification (#sec-array.prototype.includes), from TC39 (Ecma International).
- ECMAScript Language Specification (#sec-%25typedarray%25.prototype.includes), from TC39 (Ecma International).