On Tue, Jun 12, 2012 at 10:38 AM, Felix Böhm <[email protected]> wrote:

> Per definition, rest parameters always need to be at the end of a
> FormalParameterList. I was wondering if this limitation could be liftet.
>

Consider:


function foo( a, b, ...others, c ) {
  return [ a, b, others, c ];
}


foo( 1, 2, 3, 4, 5, 6, 7, 8, 9 );


  a  b  others
[ 1, 2, [ 3, 4, 5, 6, 7, 8, 9 ] ]


How do you resolve where to stop claiming arguments as items in the rest
param "others"?


Rick
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to