js-stacks

Javascript Implementation of Stack

Usage no npm install needed!

<script type="module">
  import jsStacks from 'https://cdn.skypack.dev/js-stacks';
</script>

README

Stack

Javascript Implementation of Stack

Installation & Usage :


npm install js-stacks

const Stack = require('js-stacks');

let stack = new Stack();

stack.push(1); // Push 1 to the stack
stack.pop(); // Pop 1 from the stack
stack.size; // Gives you length of the stack