let array = [1,2,3,4,5,6,7,8,9,0]
This is an example of how documentation might look
[first, ...rest] = array
will give you 1 and the rest of the array
My question now is whether it is possible to only extract the first and last elements 1 & 0
using Destructuring
For instance: [first, ...middle, last] = array
I already know how to do this in a different way, but I am curious if it can be done with ES6.