function swap(that, indexA, indexB) {
  const array = that._array;
  const temp = array[indexA];
  array[indexA] = array[indexB];
  array[indexB] = temp;
}
Gets the maximum element in the queue.
If the queue is empty, the result is undefined.

@returns {*|undefined} element