How to get array using destructing?
const num = [1,2,3,4,5];
const [ first ] = num; //1
console.log(first)
I'm able to get 1, but when I try to do const [ null, second ] = num
it has expected token error. How to get 2nd item of num array?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…