0 when the desired element has been found. A positive number when the desired element appears after the current element. A negative number when
the desired element appears before the current element.
Example
functiondirectionFn(value: number) { constsquared = value ** 2;
A function used to determine the direction a search algorithm should take when traversing data to find a desired element.