hasElement

  1. bool hasElement(T[] array, T element)
    bool
    hasElement
    (
    T
    )
    (
    T[] array
    ,)
  2. bool hasElement(T[] array, T[] elements)

Return Value

Type: bool

true if an aray has an element, false if no

Examples

assert([0, 1, 2].hasElement(2) == true);
assert([0, 1, 2].hasElement(4) == false);

Meta