Answers for "object destructuring, add properties"

CSS
0

object destructuring, add properties

const user = { 
    'first_name': 'Alex',
    'last_name': 'Brandos',
}
const { first_name, last_name, full_name=`${first_name} ${last_name}` } = user;

console.log(full_name); // Output, Alex Brandos
Posted by: Guest on October-22-2021

Code answers related to "object destructuring, add properties"

Browse Popular Code Answers by Language