SOURCE
JavaScript
Result
let
arr=
[
1
,
2
,
3
]
;
let{0:
first,[arr.length-1]:last}
=
arr;
alert(first,
last);
console 命令行工具
X
clear
>
console