Binary Search in JavaScript. A practical Example

If you have an array that you need to search, the simplest way might be to use indexOf(), or perhaps a for() loop. Either option will start on the left hand side of the array, and iterate through each item in the Array until your desired value is found. Now, compare that with a Binary Search.

Read More