On 12 June 2012 17:03, Herby Vojčík <he...@mailbox.sk> wrote: > function foo (a, b, ...rest, c, d) { ... } > foo(1, 2, 3) > > What here? > > Yes, [1, 2, [], 3, undefined] is probably the most logical one. But then d > is not the last one (yes, it is only last one when there is at least four > of them). >
Yeah, I was regretting not addressing that case. :-) I'd say your interpretation (1, 2, [], 3, undefined) would be the best answer, and easiest to explain. There's a temptation to suggest that you could reverse c and d (1, 2, [], undefined, 3), but that way surely lies madness... -- T.J.
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss