Object Creation Methods
What principle is demonstrated in this object creation pattern?
function createStack() {
const items = [];
return {
push(item) { items.push(item); },
pop() { return items.pop(); },
get length() { return items.length; }
};
}