Codington
0 of 8 problems solved • 0%
Use in a course

Exercise prompt

Remove from the Start

.shift() removes and returns the first array value.

Example

const queue = ["A", "B"]; const first = queue.shift();

Your task

Shift the first task into completedTask, then display it and the remaining tasks.