String includes()
Widely available since 2018-03-30
The includes()
method of strings returns whether a search string appears within the string.
Learning resources on MDN
Browser support (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® 2025 Language Specification (#sec-string-objects), from TC39 (Ecma International).
View web-platform-tests results for this feature - View the feature source file - Edit the feature - Report an issue about this feature