Complete the code to remove the first element from the dequeue.
const removedElement = dequeue.[1]();The shift() method removes the first element from an array or dequeue.
Complete the code to add an element to the end of the dequeue.
dequeue.[1](element);The push() method adds an element to the end of the dequeue.
Fix the error in the code to correctly remove the last element from the dequeue.
const last = dequeue.[1]();The pop() method removes the last element from the dequeue.
Fill both blanks to add an element to the front and remove an element from the end of the dequeue.
dequeue.[1](newElement); const removed = dequeue.[2]();
unshift() adds an element to the front, and pop() removes the last element.
Fill all three blanks to remove the first element, add a new element to the end, and then remove the last element from the dequeue.
const first = dequeue.[1](); dequeue.[2](newElement); const last = dequeue.[3]();
shift() removes the first element, push() adds to the end, and pop() removes the last element.
