destructin in for of javascript code example
Example 1: object destructuring example
const hero = {
name: 'Batman',
realName: 'Bruce Wayne',
address: {
city: 'Gotham'
}
};
// Object destructuring:
const { realName, address: { city } } = hero;
city; // => 'Gotham'
Example 2: js destructuring explained
const { identifier } = expression;