code: function BST(compareFn) {
    this.root = null;
    this._size = 0;
    /**
     * @var Comparator
     */
    this._comparator = new Comparator(compareFn);
  
    /**
     * Read-only property for the size of the tree
     */
    Object.defineProperty(this, 'size', {
      get: function () { return this._size; }.bind(this)
    });
  }
docs: Binary Search Tree