If x is present in arr [ low ... high ] then returns the index of first occurrence of x , otherwise returns - 1
function _binarySearch ( arr , low , high , x ) { if ( high >= low ) { let mid = parseInt ( ( low + high ) / 2 , 10 ) ;