Поставить пробел между firstName и lastName
function addFullName(user) {
const obj = {
firstName: 'value1 ',
lastName: 'value2',
};
user.fullName = user.firstName + user.lastName;
}
Expected:
{
"firstName": "Johnny",
"lastName": "Depp",
"fullName": "Johnny Depp"
}
Received:
{
"firstName": "Johnny",
"lastName": "Depp",
"fullName": "JohnnyDepp"
}
Последний раз редактировалось Liubov, 03.12.2020 в 20:01.
|