Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Destructuring Nested Objects

const user = {  id: 339,  name: 'Fred',  age: 42};
const {name} = user;
console.log(name); //Expected output: fred
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #Destructuring #Nested #Objects
ADD COMMENT
Topic
Name
7+3 =