1/*The destructuring assignment syntax is a JavaScript expression that
2makes it possible to unpack values from arrays, or properties from objects,
3 into distinct variables.*/
4 let array = [2,3];
5 [a,b] = array;// unpacking array into var a and b
6 console.log(a); //output 2
7 console.log(b); //output 3
8 let object = {name:"someone",weight:"500pounds"};
9 let {name,weight} = object; // unpacking object into var name and weight
10 console.log(name);// output someone
11 console.log(weight);//output 500pounds
12
13//it i similar as doing this
14/*
15var a = array[0];
16var b = array[1]
17var name = object.name;
18var weight = object.weight;
19
20 */