extend in js code example
Example: extend javascript
function extend(object1, ...object2) {
let mergedObject = Object.assign(object1, ...object2);
console.log(mergedObject);
return mergedObject;
}
function extend(object1, ...object2) {
let mergedObject = Object.assign(object1, ...object2);
console.log(mergedObject);
return mergedObject;
}