code: function calculateMissingPosition(lookedUpVal, domain, sort) {
    let i = -1;
    let length = domain.length;
    let found = domain[length - 1];
  
    while(++i < length) {
      let item = domain[i];
  
      if(sort(lookedUpVal, item) < 0) {
        found = item;
        break;
      }
    }
  
    return found;
  }
docs: /*
  Compare the lookedUpVal against each item in the domain, using the sort function,
  to guess where the result should be.