class Stack { constructor() { this.stack = []; } isEmpty() { return this.stack.length === 0; } peek() { return this.stack[this.stack.length - 1]; } push(element) { this.stack.push(element); } pop() { return this.stack.pop(); } } export default Stack;