Skip to content

jSenor/stack-str

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

stack-str

A complete implementation of the stack data structure :-)

Instalation

npm install stack-str

Usage

var stack = require("stack-str");
var numbers = new stack();
numbers.push(1); 
console.log(numbers) // [1];

numbers.push(2, 3, 4, 5, 7);
console.log(numbers) // [1, 2, 3, 4, 5, 7];

numbers.pop();
console.log(numbers) //[1, 2, 3, 4, 5];

numbers.isEmpty() //false
numbers.empty();
numbers.isEmpty() // true

numbers.push(8, 9, 10);
console.log(numbers.peek()) //10

About

A complete implementation of the stack data structure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published