put in comments

This commit is contained in:
Christian Bender
2018-03-30 16:04:27 +02:00
parent 5ec422e12d
commit 4d6735ee71

View File

@ -9,6 +9,7 @@
var Queue = (function () { var Queue = (function () {
// constructor
function Queue() { function Queue() {
//This is the array representation of the 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 //Add a value to the end of the queue
Queue.prototype.enqueue = function (item) { Queue.prototype.enqueue = function (item) {
this.queue[this.queue.length] = item; this.queue[this.queue.length] = item;
@ -79,4 +81,4 @@ for (var i = 0; i < 5; i++) {
myQueue.view(); myQueue.view();
} }
//console.log(myQueue.dequeue()); //console.log(myQueue.dequeue()); // throws exception!