js实现数组内数据的上移和下移
摘要:
var swapItems = function(arr, index1, index2){ arr[index1] = arr.splice(index2,1,arr[index1])[0] return arr } var arr = [1,2,3] var newArr = [] upData 阅读全文
posted @ 2017-11-13 19:15 daV_chen 阅读(6422) 评论(1) 推荐(0) 编辑