Members
isEmpty
Returns true/false if queue is empty
peek
Peek next element
size
Returns number of elements
Methods
add(val)
Add a new value to the queue
Parameters:
Name | Type | Description |
---|---|---|
val |
any |
clear()
Removes all the elements in the queue
poll() → {any}
Retrieves and remove next element
Returns:
element
- Type
- any
toArray() → {Array}
Converts and return an array from queue
Returns:
- Type
- Array