Javascript Binary Search Algorithm Geeks