Khan.randRange(5, 10) Khan.randRange(0, maxSize-1) Khan.randRange(0, maxSize-1) aqueueDequeuePRO.initJSAV(maxSize, front, rear)

Show how the dequeue operation works by selecting an element to remove, and update "rear" and "front" if appropriate.

To remove a value from the queue, just click on it. To move "front" or "rear", click it, then click the desired position in the queue.

[aqueueDequeuePRO.userInput]
if (!aqueueDequeuePRO.checkAnswer(maxSize) && !guess[0]) { return ""; // User did not click, and correct answer is not // initial array state } else { return aqueueDequeuePRO.checkAnswer(maxSize); }

We always remove from the front value. So click on the element that "front" points to.

We have to update "front" by moving it one step clockwise.

If there is nothing to remove, then just click "check answer".