has(key) {
    return !!this.get(key);
  }
Search for key and return true if it was found
Runtime: O(log n)
@param {any} key
@returns {boolean} indicating whether an element
 with the specified key exists or not.