JSFiddle - React, Tailwind, and code Playground
JavaScript
const heroes = ['Batman', 'Superman'];
const villains = ['Joker', 'Bane'];
heroes.push(...villains);
console.log(heroes); // ['Batman', 'Superman', 'Joker', 'Bane']
const heroes = ['Batman', 'Superman'];
const villains = ['Joker', 'Bane'];
heroes.push(...villains);
console.log(heroes); // ['Batman', 'Superman', 'Joker', 'Bane']