Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

object destructuring into this

const demo = { nextUrl: 'nextUrl', posts: 'posts' };

const target = {}; // replace target with this

({ nextUrl: target.nextUrl, posts: target.communityPosts } = demo);

console.log(target);
Source by dmitripavlutin.com #
 
PREVIOUS NEXT
Tagged: #object #destructuring
ADD COMMENT
Topic
Name
7+5 =