On 6/24/2013 9:44 AM, Brandon Benvie wrote:
On 6/24/2013 9:42 AM, Domenic Denicola wrote:
That led to further discision of that usage and we got into things like the last example:

```js
// Turn an array of nodeNames into NodeList of nodes
NodeList.from( ["div"], node => document.createElement(node) );
```
I think I must be missing something. Why is this superior to

```js
NodeList.from(["div"].map(node => document.createElement(node));
```

Using `NodeList.from` returns a NodeList. NodeList.from(...).map(...) returns an Array.

Sorry I misread it! I see your point.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to