Multi-index assignment.

medikoo medikoo+mozilla.org at medikoo.com
Tue Dec 5 11:39:50 UTC 2017


Just do:

```js
Object.assign(array, [0, 1]);
```

You can also omit some indexes (and they won't be overwritten with
undefined). e.g. fill just index 3 and 5:

```js
Object.assign(array, [,,,3,,5]);
```




--
Sent from: http://mozilla.6506.n7.nabble.com/Mozilla-ECMAScript-4-discussion-f89340.html


More information about the es-discuss mailing list