The implementation of the binary_search algorithm (https://github.com/nzakas/computer-science-in-javascript/blo...) is bugged by the infamous (http://googleresearch.blogspot.com/2006/06/extra-extra-read-...) "integer overflow" bug:
middle = Math.floor((stopIndex + startIndex)/2);