Dequeue


The dequeue object queue function is as follows:

dequeue ()

Removes and returns the item to the beginning of the array. This is equivalent to the Array-remove but adds in readability when using the array as a first-in first-out (FIFO) queue.

Parameters:

This function does not take any parameters

Returns:

The first item in the array.

Example:

q.enqueue("one")
q.enqueue("two")
q.enqueue("three")
// array now contains three items.
one = q.dequeue()
two = q.dequeue()
three = q.dequeue()
// queue is now empty. one is "one", two is "two" and three is "three"

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*