The spread pattern is the rest pattern in reverse—you expand a single variable into many:
const    week    =    ['mon','tue','wed','thur','fri'];

const    weekend    =    ['sat','sun'];


console.log([...week,    ...weekend]);    //    ['mon','tue','wed','thur','fri','sat','sun']

week.push(...weekend);

console.log(week);    //    ['mon','tue','wed','thur','fri','sat','sun']

results matching ""

    No results matching ""