Members
length
Returns the number of items in the queue
- Source:
Methods
dequeue() → {any}
Removes item from the front of the queue and returns the removed value.
Runtime: O(1)
- Source:
enqueue(item) → {Queue}
Adds item to the back of the queue. Return the Queue instance to allow chaining of commands.
Runtime: O(1)
Parameters:
Name | Type | Description |
---|---|---|
item |
any |
to add |
- Source: