code: function MinHeap(compareFn) {
    this._elements = [null];
    this._comparator = new Comparator(compareFn);
  
    Object.defineProperty(this, 'n', {
      get: function () {
        return this._elements.length - 1;
      }.bind(this)
    });
  }
docs: Basic Heap structure