Implement a Queue - Implement a Queue

Tell us what’s happening:

Test 2: enqueue function should add an element the back of the queue. don’t run. I don’t understand.

Your code so far

function initQueue() {
  return {
    collection: []
  };
}

function print(queue) {
  console.log(queue.collection);
}

function enqueue(queue, element) {
  queue.collection.push(element)
}

function dequeue(queue) {
  
}

function front(queue) {
  
}

function size(queue) {
  
}

function isEmpty(queue) {
  
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36

Challenge Information:

Implement a Queue - Implement a Queue

Hi @trossjhon17,

Please implement the rest of the functions before you run the tests. There are dependencies.

Happy coding!

thanks. let me try it.