code: function sharedPrefix(current, old, searchLength) {
      for (var i = 0; i < searchLength; i++) {
        if (diffBasic(current[i], old[i])) {
          return i;
        }
      }
      return searchLength;
    }
docs: find the number of items at the beginning that are the same