Posts

Showing posts from November, 2020

What is destructuring in javascript? Let us explore

Image
Destructuring in javascipt is taking out values from arrays or objects and storing them in variables. Sound simple? yes it is simple.  now let us move on another use case. suppose we only wnt the fruits values, not the vegetables. So in that case what will we do? Remember this is an array and array contains data in order. But using restructuring we can skip any no of elements in our array and can retrieve the only elements we want.