创建队列类
function Queue () {
collection = [];
this.print = function() {
console.log(collection);
};
// Only change code below this line
this.enqueue=function(arr){
collection.push(arr);
};
this.dequeue=function(){
return collection.shift();
};
this.front=function(){
return collection[0];
};
this.size=function(){
return collection.length;
};
this.isEmpty=function(){
};
// Only change code above this line
}