return two arrays in object spread operator code example
Example: javascript merge two array with spread operator
const a = ['to', 'code'];
const b = ['learning', ...a, 'is', 'fun'];
console.log(b); //> ['learning', 'to', 'code', 'is', 'fun']
const a = ['to', 'code'];
const b = ['learning', ...a, 'is', 'fun'];
console.log(b); //> ['learning', 'to', 'code', 'is', 'fun']