pop method

dynamic pop()

Return the highest priority element in the queue.

Implementation

pop() {
  return queue.removeAt(0);
}