Programming ConceptsQueue

A queue is a linear data structure that follows the First In, First Out (FIFO) principle. It is used in task scheduling and handling asynchronous data.

let queue = [];
queue.push('Task 1');
queue.push('Task 2');
console.log(queue.shift()); // Output: Task 1