it would be stupid to code like that but it makes sense since it has
basically always been like that :)

function f(a) {
  // var a superflous ... still works
  var a, b = a, a = 3, c = a;
  return a+" "+b+" "+c;
}

On Thu, Sep 27, 2012 at 5:19 PM, Allen Wirfs-Brock <[email protected]>wrote:

> Consider
>
>    function f(a, b=a, a=3, c=a) {
>       return a+" "+b+" "+c
>    }
>
>    console.log(f(1));
>
> Based upon the conclusions about argument binding at the recent TC39
> meeting this will display:
>   "3 1 3"
>
> Any disagreement of this?
>
> Allen
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to