What is destructuring in javascript? Let us explore

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.





Comments

Popular posts from this blog

Done with my second mini project !

Completed My First Mini Project !!!