Use Destructuring Assignment to Assign Variables from Arrays and predefined code

Use Destructuring Assignment to Assign Variables from Arrays and predefined code
0.0 0

#1

I am new to JavaScript and ES6. Would someone please help me in understanding this code used in above mentioned qs?

(() => { })();


#2

It’s an IIFE ( link to MDN Glossary ) where you can pass in arguments and then executes it into the curly brackets.
This
( (par1, par2) => { console.log('par1', par1); return par1*par2 })();
is the same as

function xyz (par1, par2) { console.log('par1', par1); return par1*par2 };
xyz();