Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
function Queue() {
var collection = [];
this.print = function() {
console.log(collection);
};
// Only change code below this line
this.enqueue = function(insertElement){
return collection.unshift(insertElement)
}
this.dequeue = function()
{
return collection.shift()
}
this.front = function()
{
return collection[0]
}
this.size = function()
{
return collection.length
}
this.isEmpty = function()
{
if(collection.length ==0)
{
return true
}
else{
return false
}
}
// Only change code above this line
}
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36
Challenge: Create a Queue Class
Link to the challenge: