diff --git a/Data Structures/Queue/Queue.js b/Data Structures/Queue/Queue.js index 448ec759e..0aadbaf6d 100644 --- a/Data Structures/Queue/Queue.js +++ b/Data Structures/Queue/Queue.js @@ -9,6 +9,7 @@ var Queue = (function () { + // constructor function Queue() { //This is the array representation of the queue @@ -16,6 +17,7 @@ var Queue = (function () { } + // methods //Add a value to the end of the queue Queue.prototype.enqueue = function (item) { this.queue[this.queue.length] = item; @@ -79,4 +81,4 @@ for (var i = 0; i < 5; i++) { myQueue.view(); } -//console.log(myQueue.dequeue()); \ No newline at end of file +//console.log(myQueue.dequeue()); // throws exception! \ No newline at end of file