// 使用类实现栈数据结构 class Stack { constructor() { this.items = []; } push(item) { this.items.push(item); } pop() { if (!this.isEmpty()) { return thi