Implementing Stacks & Queues

Why does this Queue implementation use an object instead of an array?
class Queue {
  constructor() {
    this.front = 0;
    this.rear = 0;
    this.items = {};
  }
  
  enqueue(element) {
    this.items[this.rear] = element;
    this.rear++;
  }
  
  dequeue() {
    if (this.isEmpty()) return null;
    const element = this.items[this.front];
    delete this.items[this.front];
    this.front++;
    return element;
  }
}
Next Question (3/20)