From 4d6735ee71de518034f534b424de2dc709ca724b Mon Sep 17 00:00:00 2001 From: Christian Bender Date: Fri, 30 Mar 2018 16:04:27 +0200 Subject: [PATCH] put in comments --- Data Structures/Queue/Queue.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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