String includes()
Widely available
The includes()
method of strings returns whether a search string appears within the string.
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
MDN docs
Specifications
- ECMAScript Language Specification, from TC39 (Ecma International).