If current element is greater than range , put it on next available greater position .
else if ( arr [ i ] > highVal ) { let temp = arr [ end ] ; arr [ end ] = arr [ i ] ; arr [ i ] = temp ; end -- ; } else i ++ ; } }