String includes()
Widely available
The includes()
method of strings returns whether a search string appears within the string.
To learn more, see
String.prototype.includes() at MDN.
Compatibility (view on caniuse.com)
- Chrome 41 Released on 2015-03-03
- Chrome Android 41 Released on 2015-03-11
- Edge 12 Released on 2015-07-29
- Firefox 40 Released on 2015-08-11
- Firefox for Android 40 Released on 2015-08-11
- Safari 9 Released on 2015-09-30
- Safari on iOS 9 Released on 2015-09-16
Specifications
- ECMAScript Language Specification (#sec-string-objects), from TC39 (Ecma International).