Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

object assign in javascript

// Object assign in javascript
let fname = { firstName : 'Black' };
let lname = { lastName : 'Panther'}
let full_names = Object.assign(fname, lname);
console.log(full_names); //{ firstName: 'Black', lastName: 'Panther' }
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #object #assign #javascript
ADD COMMENT
Topic
Name
3+7 =