JS中的数组开头添加元素 1、使用Array.unshift()方法 向数组开头添加一个或多个元素,并返回新的长度,该方法改变原数组 var fruit = ['apple', 'banana', 'mango']; console.log(fruit.unshift('orange')