From: Samuel Hapák [mailto:[email protected]]
> Could you please explain it on example?
>
> Let’s say I have
>
> ```
> let book = Map{author: {name: “John”, surname: “Doe”}, birthdate:
> “10-10-1990”};
> ```
>
> How would you extract `birthdate`? How would you extract `name`?
Your syntax here is invalid in at least four different ways. Let's assume you
wrote something with valid syntax, like
```js
let book = new Map([["author", { name: "John", surname: "Doe" }], ["birthdate",
"10-10-1990"]]);
```
Then:
```js
const [[, { name }], [, birthdate]] = book.entries();
```
If this is still confusing, you may wish to turn to StackOverflow for
clarification, instead of es-discuss. You can test such things in Firefox,
although you need to use `var` instead of `const` or `let`.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss