Update Stack.js

This commit is contained in:
Melwin Amith D'Almeida 2019-10-24 20:13:44 +05:30 committed by GitHub
parent dc1047df72
commit 5d967733ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,14 @@ export default class Stack {
.map(linkedListNode => linkedListNode.value);
}
/**
* @return {*}
*/
length() {
return this.linkedList
.toArray().length
}
/**
* @param {function} [callback]
* @return {string}