class Queue {
constructor() {
this.records = [];
}
enqueue(record) {
this.records.unshift(record);
}
dequeue() {
return this.records.pop();
}
peek() {
return this.records[this.records.length-1];
}
print() {
console.log('The queue records are -', this.records);
}
}