assign array es6 code example Example: destructure array javascript var [first, second, ...rest] = ["Mercury", "Earth", ...planets, "Saturn"];