打赏

js 数组分解 解构

// ES5
a = list[0], rest = list.slice(1)
// ES6
[a, ...rest] = list

 

posted @ 2018-08-17 18:10  孟繁贵  阅读(2793)  评论(0编辑  收藏  举报
TOP