• Determines whether the collection contains a given item

    Example

    contains([1, 2, 3], 2); // true
    

    Example

    contains([1, 2, 3], 2, 2); // false
    

    Type Parameters

    • Value

    Parameters

    • array: Value[]
    • value: Value
    • Optional fromIndex: number

    Returns boolean

Generated using TypeDoc