Preview:
//Combining arrays
const obj1 = 
{
  name: 'A',
  age: 25
},
{
  name: 'B',
  age: 25
};

const obj2 = 
{
  name: 'C',
  age: 25
};

const total = [...obj1, ...obj2];

// getting elements from array
const [a, b] = total;
//console.log: a = first element from total

downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter