2 ms·
Javascript itself supports destructuing fine, here's some javascript straight from the firefox console: > let a = [1,2,3] undefined > [x,y,z] = a
by OvermindDL1 8y ago
Javascript itself supports destructuing fine, here's some javascript straight from the firefox console:
> let a = [1,2,3]
undefined
> [x,y,z] = a
Array(3) [ 1, 2, 3 ]
> x
1
> y
2
> z
3