属性:
constructor 所修立对象的函数参考
prototype 能够为对象加入的属性和方法
index For an array created by a regular expression match, the zero-based index of the match in the string.
input For an array created by a regular expression match, reflects the original string against which the regular expression was matched.
length 获取数组元素的个数,即最大下标加1
办法(13):
concat(array1,arrayn)将两个或两个以上的数组值衔接止来,合并后返回成果
join(string) 将数组中元素合并为字符串,十月妈咪,string为分隔符.如省详参数则直交合并,不再分隔
pop() 移除数组中的最后一个元素并返回当元素
push(value) 在数组的终尾加上一个或多个元素,并且返回新的数组长度值
reverse() 倒置数组中元素的次序,反背排列
shift() 移除数组中的第一个元素并返回当元素
slice(start, deleteCount, [item1[, item2[,...[,itemN]]]]) 返从一个数组中移除一个或少个元素,假如必要,在所移除元素的地位上拔出新元素,返回所移除的元素
sort(compare Function) 在已指定排序号的情形下,依照元素的字女次序排列,假如不是字符串类型则转换成字符串再排序,返回排序后的数组
splice() 为数组删除并加加新的元素
toSource() 显示对象的源代码
toString() 将数组一切元素返回一个字符串,其间用逗号分隔
unshift(value)为数组的开端部门加上一个或者少个元荤,并且返回当数组的新长度
valueOf() 返回数组对象的原始值
网友评论