constructor(comparator = (a, b) => a - b) {

        /**
         * Array used to manage the heap.
         * @property array
         * @type Array
         * @private
         */
        this[array] = [];

        /**
         * Comparator to compare values.
         * @property comparator
         * @type Function
         * @private
         */
        this[compare] = comparator;
    }
Creates a new instance of BinaryHeap
@param {Function} [comparator] A comparator function.