Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

destructure nested object properties

const {
  address: { country },
} = user;

console.log(country);
// South Africa
Source by h.daily-dev-tips.com #
 
PREVIOUS NEXT
Tagged: #destructure #nested #object #properties
ADD COMMENT
Topic
Name
3+3 =