Search Docs
先进后出
const stack = []; stack.push(...[1, 2, 3]); while (stack.length > 0) { console.log(stack.pop()); }