JavaScript destructuring
Destructuring in javascript is an expression that makes it possible to select values as variables from arrays or objects. How it works? Array destructuring Let’s start with an example: As you can see above will initialize two variables with values 1 and 2 respectively by destructuring that array…