format
typescript
Stack.Pop()class: Stack
description
Pops an element from the stack.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
T|undefined | The popped element value. |
code example
typescript
let stack = new Stack<Number>();
stack.Push(1);
stack.Push(2);
stack.Push(3);
// Pop the top element from the stack
let poppedItem = stack.Pop();
Debug.Log("Popped element:", poppedItem);