Liubov,
как вариант ...
<pre>
<script>
let obj = {
"firstName": "Johnny",
"lastName": "Depp"
}
function addFullName(user) {
let {firstName : a, lastName : b} = user;
user.fullName = [a, b].join(' ');
return user
}
document.write(JSON.stringify(addFullName(obj), "", 4))
</script>
</pre>