Rest parameter anywhere

Boris Zbarsky bzbarsky at MIT.EDU
Wed Apr 16 07:59:32 PDT 2014


On 4/16/14 8:27 AM, Егор Николаев wrote:
> ```javascript
> let [a = 1, b = 2, ...rest, c = 4, d = 5] = [9, 8, 7];
> ```
> a == 9, b == 8, rest == [], c == 7, d == 5
> obviously. As in coffeescript

I assume multiple rest parameters are a syntax error?

-Boris


More information about the es-discuss mailing list