peek Summary Returns the most earliest element pushed without removing it. Usage public T+ peek() Returns The element at the top of the queue (earliest element added) or undefined if the queue was empty. Description Returns the most earliest element added to the queue without removing it. If the queue is empty, undefined will be returned. Examples Basic Usage 12345import System; auto queue = new Queue<int>([ 1, 2 ]);Console.log(queue.peek()); // 1Console.log(queue.peek()); // 1 Share HTML | BBCode | Direct Link