Today, how to unpack an array and copy them to variables.. That is what we cover today.
Ok.. let create array...
this array we will copy to new three variables..........let madexweynayaal=["HassanSheikh","AhmedSilaanyo", "CabdiwaliMaxamed"];
now you can console..let [madexweynahaSomalia,madexweynahaSomaliland, madexweynahaPuntland]=madexweynayaal;
That is how you can destructuring array into variable..console.log(madexweynahaSomalia,madexweynahaSomaliland,madexweynahaPuntland);
her is full.
it will out put..<script type="text/javascript">
let madexweynayaal=["HassanSheikh","AhmedSilaanyo", "CabdiwaliMaxamed"];
let [madexweynahaSomalia,madexweynahaSomaliland, madexweynahaPuntland]=madexweynayaal;
console.log(madexweynahaSomalia,madexweynahaSomaliland,madexweynahaPuntland);
</script>
\\HassanSheikh AhmedSilaanyo CabdiwaliMaxamed
See you next module...
///