array.slice(start,end)? ? 返回截取的數(shù)組(不包括end本身)
array.shift()? 刪除數(shù)組中第一個(gè)
array.pop()??刪除掉數(shù)組的最后一個(gè)元素
array.splice(start,num)? ? Start :索引值? ? num:要?jiǎng)h除的個(gè)數(shù)(為0則不刪除)
array.splice(start,num,value)? ?num為0時(shí)候則是在start后增加數(shù)組? ?value為增加的值
array.push() 在數(shù)組的后面增加
array.unshift(value,value) 方法將一個(gè)或多個(gè)元素添加到數(shù)組的開(kāi)頭
array.indexOf(ele) 返回在數(shù)組中的索引,有多個(gè)的情況出現(xiàn)
array.sort()? 對(duì)數(shù)組進(jìn)行排序 排序是不穩(wěn)定的
array.contact() 合并數(shù)組
array.reverse() 對(duì)數(shù)組進(jìn)行倒序
array.join() 將數(shù)組合并到一個(gè)字符串當(dāng)中