[Webkit-unassigned] [Bug 151026] Destructuring Assignment: Properties are valid AssignmentElements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 12 14:03:27 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=151026

--- Comment #5 from Caitlin Potter <caitpotter88 at gmail.com> ---
The most common observable use (as far as I can tell), is assigning to properties of "this", eg in a constructor.

eg:

```
class FancyNode {
  constructor(nodePosition = null) {
    ({ x: this.x, y: this.y } = nodePosition);
  }
}
```

or something similar. The other uses are legal and observable, but probably not very useful?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151112/248a0ee8/attachment.html>


More information about the webkit-unassigned mailing list