//言而总之,不定长参数也是一个类似于数组的对象,将其转为数组即可标签:function,items,rest,参数,数组,push,array,不定 From: https://blog.51cto.com/u_16021118/6141092
function push(array, ...items) {
items.forEach(function(item) {
array.push(item)
})
return array
}
var a = []
console.log(push(a, 1, 2, 3)[1])