Queue in javascript

As requested by @florian, here is a link to a Gist of my JS implementation of a Queue. Let me know what you think, of if you have questions. I included the test files too, just in case.


Nice, for extra credit you could convert this to use the JS native Array and see what that does for you. For the most part it’d just be translating the API for queue to use some API on Array.

A free service run by Zed A. Shaw for learncodethehardway.org.