JSFiddle - React, Tailwind, and code Playground

by Reshma S Raveendran

Babel + JSX

//When using spread, you are expanding a single variable into more
//For array
var arry1 = ['a', 'b', 'c'];
var arry2 = ['f', 'e', 'd'];

var final = [...arry1, ...arry2];
console.log(final); 

//When using rest arguments, you are collapsing all remaining arguments of a function into one array
const names = {tech1: 'Bob', tech2: 'Fred', tech3: 'Neymar'};

const { tech1, ...others } = names;

console.log(tech1); // Bob
console.log(others); // {tech2: 'Fred', tech3: 'Neymar'}