0% found this document useful (0 votes)
5 views7 pages

Understanding Array Destructuring in ES6

The document explains array destructuring, a feature in ES6 that allows unpacking array elements into multiple variables. It also covers concepts like assignment, which involves storing variable values, and swapping, where two variables exchange their values. Additionally, it mentions how to access specific items in an array using commas as separators.

Uploaded by

vmarivada
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views7 pages

Understanding Array Destructuring in ES6

The document explains array destructuring, a feature in ES6 that allows unpacking array elements into multiple variables. It also covers concepts like assignment, which involves storing variable values, and swapping, where two variables exchange their values. Additionally, it mentions how to access specific items in an array using commas as separators.

Uploaded by

vmarivada
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JS

ARRAY
DESTRUCTURING

Ajay Yadav
@ATechAjay
Destructuring

Ajay Yadav
@ATechAjay
Destructuring

Desctructuring means dividing an array


into multiple variables. 

It is an ES6 syntax that allows us to unzip


or unpack an array of elements into multiple
variables.

Ajay Yadav
@ATechAjay
Assignment items

Assignment means storing the value of a


variable into another variable.

Ajay Yadav
@ATechAjay
Swapping items

Swapping means the value of two


variables are replaced to with each other.

Ajay Yadav
@ATechAjay
Escaping the items

If we want to get the first and last item in


an array, we can use the comma ( , ) as a
separator.

Ajay Yadav
@ATechAjay
Thanks for the reading
Follow me for ultimate content

on HTML, CSS, JavaScript,


React, DSA, and Git

Ajay Yadav
@ATechAjay

You might also like