摘要: Array.shift()shift() 方法用在数组上, 移除数组的第一个元素并返回移除的元素. 该方法会改变原数组的长度.const array1 = [1, 2, 3];const firstElement = array1.shift();console.log(array1); // Ex 阅读全文
posted @ 2023-08-22 10:58 weimiu 阅读(177) 评论(0) 推荐(0)