Blogger Information
Blog 7
fans 0
comment 0
visits 8097
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
slice()
dongfeng的博客
Original
628 people have browsed it

slice(from.unit);


var arr = new array(3)
arr[0] = "LiMing"
arr[1] = "MaoMao"
arr[2] = "DongDong"

document.write(arr + "<br />")
document.write(arr.slice(1) + "<br />")
document.write(arr)

1复 制数组中的元素
2将它们作为新数组返回
3不会更改原始数组
4从from开始切片直到until索引:array.slice(from,end)
5切片不包括“end”索引值的元素
6可以用于数组和字符串

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post