摘要:
1.shift()函数定义该函数从从数组中删除第一项,并返回该删除项。用法示例var fruits = ["Banana", "Orange", "Apple", "Mango"];fruits.shift()console.log(fruits);结果输出:Orange,Apple,Mango注:该方法会改变数组的长度2.pop()函数定义该函数从从数组中删除最后项,并返回该删除项。用法示例var fruits = ["Banana", "Orange", "Ap 阅读全文