I want to make a function which can take any number of arguments. I can make function with fix arguments but I'm not able to solve with n arguments.
Example:
const first = { x: 2, y: 3};
const second = { a: 70, x: 4, z: 5 };
const third = { x: 0, y: 9, q: 10 };
const firstSecondThird = extend(first, second, third);
// { x: 2, y: 3, a: 70, z: 5, q: 10 }
const secondThird = extend(second, third);
// { a: 70, x: 4, z: 5, y: 9, q: 10 }`