Unite Family
Given three objects
function uniteFamily( obj ) {
for ( key in obj ) {
console.log(key + ': ' + obj[key]);
}
}
let father = {
name: 'father',
age: 36
}
let mother = {
test: 'test'
}
let child = {
hobby: 'basketboll'
}
uniteFamily( {...father, ...mother, ...child} )
Comments
Leave a comment