


The compatibility table in this page is generated from structured data. However, you can easily polyfill this method: Specifications SpecificationĮCMAScript Latest Draft (ECMA-262) The definition of '' in that specification.ĮCMAScript 2015 (6th Edition, ECMA-262) The definition of '' in that specification.

This method has been added to the ECMAScript 2015 specification and may not be available in all JavaScript implementations yet. For example, the following expression returns false: Examples Using includes() Polyfill This method lets you determine whether or not a string includes another string. True if the search string is found anywhere within the given string otherwise, false if not. position Optional The position within the string at which to begin searching for searchString. Syntax str.includes( searchString) Parameters searchString A string to be searched for within this string. If you'd like to contribute to the interactive examples project, please clone and send us a pull request. The source for this interactive example is stored in a GitHub repository.
