You can already do it like this:

```js
((...[,,foo]) => foo)(1, 2, 3) // -> 3
```


R. <http://untu.ms/>

On Sun, May 29, 2016 at 6:53 PM, Cyril Auburtin <cyril.aubur...@gmail.com>
wrote:

> Similarly to:
>
> `var [,x,,y] = [1,2,3,4,5,6];`
>
> I think it could be interesting to let a field empty in function arguments
>
> `[1,2,3,4].map( (,i) => i )`, `Array.from({length:10}, (,i) => i )`
>
> `function test(a,,b) { }`
>
> (but that would alter the current parsing, that doesn't allow it)
>
> Currently I often use `_` as a way to mark ignored fields, but when there
> are more than 1 you need another identifier. A standard way would be
> interesting rather
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to