stack-node

1.0.1 • Public • Published

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();

Readme

Keywords

none

Package Sidebar

Install

npm i stack-node

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

1.95 kB

Total Files

4

Last publish

Collaborators

  • hovsep