binary search logic
binary search via callback.no redundant search.
how to use toBinarySearchIndex
define Number.prototype
1. declare valuelet v=02. loop
for(let i;1<l-v;)3. set value
this<c(i=v+l>>>1)?l=i:v=i4. return
return vlet v=0for(let i;1<l-v;)this<c(i=v+l>>>1)?l=i:v=ireturn v