Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 646 Bytes

includes.md

File metadata and controls

34 lines (22 loc) · 646 Bytes

strings.includes

includes(string, substr, start)

Includes determines whether one string can be found in another string

Arguments

  1. string (string): input string
  2. substr (string): candidate string to be searched for
  3. start (Number): index to begin search for string

Returns

(boolean): does the input string include the substring?

Example

const result = strings.includes('This Lovely Life', 'Love');
console.log(result);
> true