-
isEmpty() → {boolean}
-
returns if stack is empty
.isEmpty()
- Source:
Returns:
flag
-
Type
-
boolean
-
isFull() → {Boolean}
-
isFull checks if stack is full
- Source:
Returns:
flag
-
Type
-
Boolean
-
peek() → {String|Number}
-
returns top element on stack
.peek()
- Source:
Returns:
item
-
Type
-
String
|
Number
-
pop() → {String|Number}
-
pop element from stack
and decrement stack top, returns poped element
.pop()
- Source:
Returns:
item that was on top of stack
-
Type
-
String
|
Number
-
push(item)
-
push element to stack
and increment stack top
.push(item)
Parameters:
Name |
Type |
Description |
item |
String
|
Number
|
|
- Source:
Throws:
-
If [stack is full]
-
-
Type
-
Error