1.0.1 • Published 4 years ago
stack-node v1.0.1
Stack is a data structure which implements an array friendly interface
Class Methods
Stack.push(data);
Stack.pop();
Stack.peek();
Stack.isEmpty();
Stack.printStack();
Example
const Stack = require('stack-node');
let stack = new Stack();
for (let i = 0; i < 10; i++) {
stack.push(i);
}
console.log(stack.pop());
console.log(stack.peek());
stack.printStack();