One of the most interesting features that ES6 added to JavaScript was object and array destructuring. With destructuring we can take part of an array or an object very easily. Let’s understand by taking up a few examples

Array Destructuring

const alphabets = ['A','B','C','D','E','F']
const numbers = ['1','2','3','4','5','6']

Now if we have…

Vikash Kumar Jha

Full Stack Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store