/Custom-Array

Primary LanguageJavaScript

// Add following methods :-
// .push // Should add an element at the end.
// .pop() // Should remove an element from the end.
// .top() // Should return the element at the last index.
// .print() // Should print the elements in a single line (e.g. [1,2,3,4]).
// .printReverse() // Should print the elements in a single line in reverse order.
// .size // Should return the length of the stack