DEV Community

Peter Perkins
Peter Perkins

Posted on

Learn Array Destructuring

👏 #mustknow

Learning JS or React? Learn to deconstruct arrays using the destructuring assignment syntax.

Example curtesy MND Web Docs
({ a, b } = { a: 10, b: 20 });
console.log(a); // 10
console.log(b); // 20
Enter fullscreen mode Exit fullscreen mode

Top comments (0)