Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 254 Bytes

File metadata and controls

20 lines (15 loc) · 254 Bytes

栈方法

通过使用Array.push方法,实现栈的推入操作

{
  let array = [1,2,3,4];
  array.push(5);
}

通过使用Array.pop方法,实现栈的推出操作

{
  let array = [1,2,3,4];
  array.pop();
}