How to get an array using destruction?
const num = [1,2,3,4,5];
const [ first ] = num;
console.log(first)I can get 1, but when I try to do it const [ null, second ] = num, he was expecting a token error. How to get the 2nd element of the num array?
source
share