lenkapenka-stack
v0.0.2
Published
Stack in JavaScript
Downloads
4
Readme
Stack
Simple stack implementation in JavaScript
How to develop
git clone [email protected]:eseredova/lenkapenka-stack.git
cd lenkapenka-stack
npm install
API
const Stack = require('lenkapenka-stack');
const stack = new Stack();
//adds a new element onto the top of the stack
stack.push(value)
//removes the element from the top of the stack
stack.pop()
//returns the element from the top of the stack
stack.peek()
//returns true if stack is empty, false otherwise
stack.isEmpty()