I have an array = [[1, 2, 3, 4] [5, 6, 7, 8]]
My goal is to create an object from array. Object should look like this
{ 
   1: 2,
   3: 4,
   5: 6,
   7: 8,
}
So, the question is what's the easiest way to do it. Someone advised me to use destructuring assignment.
 
     
    