Skip to content

Commit 4d6735e

Browse files
author
Christian Bender
committed
put in comments
1 parent 5ec422e commit 4d6735e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Data Structures/Queue/Queue.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99

1010
var Queue = (function () {
1111

12+
// constructor
1213
function Queue() {
1314

1415
//This is the array representation of the queue
1516
this.queue = [];
1617

1718
}
1819

20+
// methods
1921
//Add a value to the end of the queue
2022
Queue.prototype.enqueue = function (item) {
2123
this.queue[this.queue.length] = item;
@@ -79,4 +81,4 @@ for (var i = 0; i < 5; i++) {
7981
myQueue.view();
8082
}
8183

82-
//console.log(myQueue.dequeue());
84+
//console.log(myQueue.dequeue()); // throws exception!

0 commit comments

Comments
 (0)