📜  unshift - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:27.598000             🧑  作者: Mango

代码示例3
const array1 = [1, 2, 3];

console.log(array1.unshift(4, 5));
// expected output: 5

console.log(array1);
// expected output: Array [4, 5, 1, 2, 3]