编辑代码
JS代码
14.16.1
10.16.0
运行
let
arr
=
[
1
,
2
,
3
,
4
,
5
,
6
]
;
let
newArr
=
arr.slice(1,5);
console.log(newArr);//
左开右闭
console.log(arr);