队列 遵循先进先出原则,从后面插入,前面删除 class Queue { constructor() { this.items = [] } push(value) { this.items.push(value) return this.items } shift() { return this.items.shift() } }