栈方法 通过使用Array.push方法,实现栈的推入操作 { let array = [1,2,3,4]; array.push(5); } 通过使用Array.pop方法,实现栈的推出操作 { let array = [1,2,3,4]; array.pop(); }