Method ADT.Stack()->peek()


Method peek

ElementType peek(int|void offset)

Description

Returns an element from the stack, without popping it.

Parameter offset

The number of elements from the top of the stack to skip.

Throws

Throws an error if called on an empty stack.

See also

top()