# Suggestion: Destructuring object initializer.
----------
 Destructuring assignment: it extracts values by destructuring an object, and 
assign _them_ to ‘variables.’ I suggest Destructuring object initialization 
syntax; it is similar to Destructuring assignment, except that it initializes 
an object with _the extracted values_.
```javascriptconst name_info = {"first name": "Yeong-u", "last name": "Kim", 
nickname: "K."};const e = "computed property name";
const object = {        name: {         *{"first name": forename, "last name": 
surname}: name_info      },      *[a, b, c]: [1, 2, 3],  *[d]: [4],      [e]: 
"This is not part of the syntax"   *[{"some property name": "new one"}]: 
[{"some property name": 5}],      *{gettable: something}: {get gettable() 
{return Symbol("Using [[Get]]");}}};/*  {               name: {                 
forename: "Yeong-u",                    surname: "Kim"          },              
a: 1,           b: 2,           c: 3,           d: 4,           "computed 
property name": "This is not part of the syntax",             "new one": 5,     
      something: Symbol(Using [[Get]])        }*/```
----------
 I would appreciate hearing your opinion on this.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to