Arrary.slice(start,end):
剪切,返回新数组选定的元素(不包括end值),不改变原数组
var arr = [ 5, 88, 66, 46, 53 ]
console.log( arr.slice(1,3), arr ) //[88], [5, 88, 66,46,53]
Arrary.splice(index,howmany,item):
添加删除元素,返回被删除的元素,改变原数组
var arr = [ 5, 88, 66, 46, 53 ]
console.log( arr.splice (1,3), arr ) //[88, 66, 46], [5, 53]
str.split():
把字符串分割成字符串数组
var strArr = “zhaorongrong”
console.log( arr.split(“ ”), strArr ) //["z", "h", "a", "n", "g", "r", "o", "n", "g", "w", "u"] "zhangrongwu"