Unite Family
Given three objects
Sample Input
{'surname' : 'Jones', 'city': 'Los Angeles'}
{'dish': 'puddings'}
{'pet': 'Peter'}
Sample Output
Mr and Mrs Jones went to a picnic in Los Angeles with a boy and a pet Peter. Mrs Jones made a special dish "puddings"
function uniteFamily(father, mother, child) {
console.log(`Mr and Mrs ${father['surname']} went to a picnic in ${father['city']} with a boy and a pet ${child['pet']}. Mrs ${father['surname']} made a special dish "${mother['dish']}"`);
}
let father = {
'surname' : 'Jones',
'city': 'Los Angeles'
}
let mother = {
'dish': 'puddings'
}
let child = {
'pet': 'Peter'
}
uniteFamily(father, mother, child)
Comments
Leave a comment