Function notIncludes

  • check if array includes a specific element

    Type Parameters

    • T

    Parameters

    • array: T[]
    • Rest...elements: T[]

    Returns void

    includes([1, 2, 3], 2);
    
    includes([1, 2, 3], 2, 3);
    
  • check if string includes a specific string

    Parameters

    • string: string
    • Rest...elements: string[]

    Returns void

    includes('abc', 'b');
    
    includes('abc', 'b', 'c');
    
    includes('abc', 'bc');