dequeue() { const item = this.elements[this.head]; delete this.elements[this.head]; this.head++; return item; }