UNPKG

ds-algo-study

Version:

Just experimenting with publishing a package

20 lines (15 loc) 236 B
class Stack { constructor() { this.data = []; } push(record) { this.data.push(record); } pop() { return this.data.pop(); } peek() { return this.data[this.data.length - 1]; } } module.exports = Stack;