Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

es6 parameter destructuring nested object

const myFunc = ({event: {target: {name,secondName}}}) => {
  console.log(name);
  console.log(secondName);
}

myFunc({event: {target: {name: 'fred'}}})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #parameter #destructuring #nested #object
ADD COMMENT
Topic
Name
8+1 =