Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

object destructuring in javascript

const hero = {
  name: 'Batman'
};
// Object destructuring:
const { name: heroName } = hero;
heroName; // => 'Batman'
Source by dmitripavlutin.com #
 
PREVIOUS NEXT
Tagged: #object #destructuring #javascript
ADD COMMENT
Topic
Name
1+6 =