getIndex(key) {
    const indexHash = this.hash(key);
    const index = indexHash % this.buckets.length;
    return index;
  }
Get the array index after applying the hash funtion to the given key
@param {any} key