1.0.0 • Published 8 months ago
queue-package v1.0.0
Queue
A simple JavaScript implementation of a queue data structure using a factory function.
Methods
Methods
- enqueue(item): Adds an item to the back of the queue.
- dequeue(): Removes and returns the front item of the queue.
- front(): Returns the front item of the queue without removing it.
- isEmpty(): Checks if the queue is empty and returns a boolean.
- size(): Returns the current size of the queue.
- print(): Prints the items of the queue in the order they appear.
1.0.0
8 months ago