248 Teilen
2 Ergebnisse
markiert
#destructuring
In es6, how can i simplify the following lines using destructuring?:
const array0 = someArray[0].data;
const array1 = someArray[1].data;
const array2 = someArray[2].data;
I love destructuring. However, as I use it more, I am running into some odd gotchas.
Let’s start with the basics. Here is a simple example that extracts a single prop.
