Web platform features explorer

String includes()

Widely available since 2018-03-30
Tags: javascript Groups: JavaScript > Primitive types > Strings

The includes() method of strings returns whether a search string appears within the string.

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