Implementing Stacks & Queues

What optimization technique is implemented in this queue?
class Queue {
  constructor() {
    this.elements = [];
    this.maxSize = 1000;
    this.head = 0;
    this.tail = 0;
  }
  
  enqueue(element) {
    if (this.tail - this.head >= this.maxSize) {
      this.elements = this.elements.slice(this.head, this.tail);
      this.tail -= this.head;
      this.head = 0;
    }
    this.elements[this.tail] = element;
    this.tail++;
  }
}
Next Question (18/20)