A stack is a linear data structure following the LIFO (Last In, First Out) principle.

Operations: push (add), pop (remove), peek (view top).

Use Cases: Undo operations, recursion management, syntax parsing.

Example in JS:

let stack = [];

stack.push(1); // Add

stack.pop();