This project is a practice project that implements an asynchronous queue using JavaScript. The project is structured into two main parts: the Structures
folder and the Root
folder.
The Structures
folder contains two JavaScript files: Node.js
and Queue.js
.
The Node.js
file exports a Node
class that represents a node in a queue. Each node has a value and a reference to the next node in the queue.
The Queue.js
file exports a Queue
class that represents a queue. The queue has methods for pushing a value onto the end of the queue and shifting a value off the front of the queue.
The AsyncQueue.js
contains the main script that uses the Queue
class to implement an asynchronous queue. The script includes methods for enqueuing and dequeuing values, closing the queue, and making the queue iterable asynchronously.
This project is a great way to practice and understand the concept of asynchronous programming in JavaScript. Enjoy coding!