The type of the elements
The iterable in which the element will be binary-searched for. It must be sorted.
The element that will be searched for.
Optionalcomparator: OrderComparator<TElement, TElement>The comparator method that will be used to compare the elements. It should always be provided if the sequence is of a complex type.
The index of the element that is equal to the searched element. If the element is not found, returns -1.
Performs a binary search on the given sequence and returns the index of the element. The sequence must be sorted prior to calling this method. If the searched element exists multiple times in the sequence, the returned index is arbitrary.