Binary Search Study Guide Leetcode Javascript Question