JS数组方法----push() push()–可以接收任意数量的参数,把它们逐个添加到数组末尾,并返回修改后数组的长度。 var arr = [1,2,3,4,5];//新建数组,数组长度为5; !function(){ console.log(arr.push(6));//往数组末尾添加新项,返回length=6; console.log(arr);//添加后的数组的所有项; }();