1、数组方法:
concat(otherArray) 把otherArray的元素添加到数组末尾
join(separator) 把数组所有的元素连接成一个字符串,separate用来分隔这些元素
push(item) 把item作为数组的最后一个元素追加到数组中
reverse() 得到与原数组元素顺序相反的新数组
pop() 删除数组的最后一个元素并返回该元素
shift() 删除并返回数组的第一个元素
slice(start,end) 返回一个子数组
sort() 返回元素排序后的新数组
splice(index,count) 从指定的索引index开始,在数组中删除count个元素
unshift(item) 把新元素添加到数组开头






网友评论